Announcement

Collapse
No announcement yet.

Userbutton and statictext as caption

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

  • Userbutton and statictext as caption

    Hi,
    I wonder if there is a way to keep the statictext (caption) always on top of its userbutton.

    Scenario:
    I have a momentary userbutton with images for the different states.
    I have a statictext, which is the caption of the userbutton.

    When the state of the userbutton changes, I have to redraw both the userbutton and the statictext:
    img_SetWord(hndl, userbutton1, IMAGE_INDEX, newState);
    img_Show(hndl, userbutton1);
    img_Show(hndl, statictext1);


    Is there a way to define the order of the objects and to say to the statictext to stay always above the userbutton?

    Thanks in advance for the support!
    Last edited by sefiel; 22nd July 2019, 11:19 PM.

  • #2
    Hi,

    I wonder if there is a way to keep the statictext (caption) always on top of its userbutton.
    You may want to consider imprinting the 'text' on the image you are using through a graphics editor software (e.g Photoshop).

    Or if you want, you can also put the code on a method.

    Code:
    func buttonShow (newState)
        img_SetWord(hndl, userbutton1, IMAGE_INDEX, newState);
        img_Show(hndl, userbutton1);
        img_Show(hndl, statictext1);
    endfunc
    I hope this helps.

    Best Regards,
    Kevin

    Comment

    Working...
    X