This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129XNCZAD: Touch screen event

Part Number: TM4C129XNCZAD

Dear Sir, 

I am using TM4C129X development board.

I refereed the TI library and designed 4-5 canvas screen using touch .

Every canvas having Next & previous button like grlib demo code.

On click on next i am moving toward next canvas and click on previous moving back,

Now issue is one of screen i enable the user input field so click on user input field the keyboard display coming .

That is used for input the data but when  i click on ENT button background next button event fire.

How to disable that event.

If the next button not overlap with ENT of keyboard then working fine. How to disable background event.

RectangularButton(g_sNext, 0, 0, 0, &g_sKentec320x240x16_SSD2119,
(320-50-X_OFFSET),205,50,35,
PB_STYLE_IMG | PB_STYLE_TEXT, ClrBlack, ClrBlack, 0,
ClrYellow, g_psFontCm20, "+", g_pui8Blue50x50,
g_pui8Blue50x50Press, 0, 0, OnNext);

  • HI,

    That is used for input the data but when  i click on ENT button background next button event fire.

    How to disable that event.

    If the next button not overlap with ENT of keyboard then working fine. How to disable background event.

    Sorry, although I know a bit about the LCD controller but not really an expert to answer questions in depth. What is the ENT?  I can't visualize what is on the display as I don't know how you organize the ENT and next buttons. Can you take a picture of what is on the display screen. In any case, as you said, you seem to have the ENT and the next button overlapped. If they are not overlapped then it is working fine. Why do you want to have ENT and next button overlapped? If making them non-overlap will solve the problem, why wouldn't you do so?

  • Dear Sir,

    My LCD screen Error measurement with + and - button.(Attached for reference)

    Click on White field open the keyboard(attached)

    After pressing the keys on keyboard and press ent key then background + key of error measurment trigger and  display next another screen instead of same original screen of Error measurement.

  • HI,

      I'm not an expert on grlib. Perhaps you can reference the same code as  provided in the grlib_demo.c example. Here in this code, when a '+' button is pressed, it will do three things:

      1. Remove the current panel

      2. Add the new panel to the Widget tree

      3. Remove the '+' button if this is the last panel

      I think you can mimic this code for your pulldown button to bring up the keyboard. I suppose you can do something like below. I'm not sure if this will work or not. If you find a way to workaround the problem please share your idea with the community. 

      1. Remove the current panel

      2. Remove the '+' button

      3. Add the new panel (the soft keyboard) to the Widget tree

    void
    OnNext(tWidget *psWidget)
    {
        //
        // There is nothing to be done if the last panel is already being
        // displayed.
        //
        if(g_ui32Panel == (NUM_PANELS - 1))
        {
            return;
        }
    
        //
        // Remove the current panel.
        //
        WidgetRemove((tWidget *)(g_psPanels + g_ui32Panel));
    
        //
        // Increment the panel index.
        //
        g_ui32Panel++;
    
        //
        // Add and draw the new panel.
        //
        WidgetAdd(WIDGET_ROOT, (tWidget *)(g_psPanels + g_ui32Panel));
        WidgetPaint((tWidget *)(g_psPanels + g_ui32Panel));
    
        //
        // Set the title of this panel.
        //
        CanvasTextSet(&g_sTitle, g_pcPanelNames[g_ui32Panel]);
        WidgetPaint((tWidget *)&g_sTitle);
    
        //
        // See if the previous panel was the first panel.
        //
        if(g_ui32Panel == 1)
        {
            //
            // Display the previous button.
            //
            PushButtonImageOn(&g_sPrevious);
            PushButtonTextOn(&g_sPrevious);
            PushButtonFillOff(&g_sPrevious);
            WidgetPaint((tWidget *)&g_sPrevious);
        }
    
        //
        // See if this is the last panel.
        //
        if(g_ui32Panel == (NUM_PANELS - 1))
        {
            //
            // Clear the next button from the display since the last panel is being
            // displayed.
            //
            PushButtonImageOff(&g_sNext);
            PushButtonTextOff(&g_sNext);
            PushButtonFillOn(&g_sNext);
            WidgetPaint((tWidget *)&g_sNext);
        }
    
        //
        // Play the key click sound.
        //
        PlayClick();
    }