Announcement

Collapse
No announcement yet.

Darken buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Darken buttons

    Hi all,

    i'm new here and i'm starting to work on uLCD43 PT.
    I need to switch to different frames pushing a button on the main menu.

    I don't find a way to disable and clear all the button in the main frame to show the button of the second frame.

    I tryed with this

    img_Enable(hndl, isetup);
    img_SetWord(hndl, isetup, IMAGE_FLAGS, (img_GetWord(hndl, isetup, IMAGE_FLAGS) | I_STAYONTOP) & ~I_TOUCH_DISABLE); // set to enable touch, only need to do this once
    img_Show(hndl, isetup); // show button, only do this once

    img_Darken(hndl, isetup);
    img_Show(hndl, isetup);
    img_Disable(hndl, icount);

    i tryed also removing the show command and the disable command but nothing.

    Did anybody know how to manage different frame?
    i think that the only way is clear the screen and set the new controls.

    Federico

  • #2


    i think that the only way is clear the screen and set the new controls.
    That is the correct way, it is not like Windows where you can show and hide and the buffer memory takes care of everything. Once you have shown an image the only way to get rid of it is to replace it with something else.

    You do need to disable it to ensure it will not be detected when touched.

    To work out what to programmatically disable/enable/show, have a look at the created "yourprogramConst.inc" file. You can often use a for loop to disable one form and enable another.
    Mark

    Comment


    • #3


      HI,

      thanks for the answer.

      i create two function for two frame.
      I clear the screen, disable everything, set and enable the new buttons etc.

      All works fine but i have a froblem with keyboard beause seams that it stay disable.
      it's possible that the problem is the enable touch function that i call only one time at the start of the program?
      Any suggestion?

      Comment


      • #4


        Enable touch only needs to be called once.

        For a keyboard there are many image control entries.

        The first, an image of the full keyboard in various states, should never be enabled for touching.

        The reset, images of each key in various states, are the ones that need to be enabled for touching.

        If you enable the first then the keys will never appear to be touched.
        Mark

        Comment


        • #5


          O yes, i made it and now it works fine.
          I enable every key.

          thanks a lot

          Comment

          Working...
          X