in my apps I tend to use text labels as buttons (easier then messing up with canvasses). It works for my scope. I’d like to know, though, if there is a way to have some sort of visual clue that the label/button has been clicked upon, something like a flickering or a momentary highlite.
Does anybody have some suggestion?
Do a bold=true and then call a Method which does a bold=false after 1 Second or so.
Timer.CallLater(1000, AddressOf Method_ResetCaption)
Worth a try.
If you “need” this often:
Create a Subclass of the Standard Xojo DesktopLabel
Add a Method to your Subclass and add something like
Self.Bold = False to this Method
In the MouseDown Event of your Subclass add something like:
Me.Bold = True
Timer.CallLater(1000, AddressOf YourMethodName)
Add a “MouseDown” Event Definition to your Subclass using a rightclick and the context menu of the “MouseDown” Event Handler.
Now use this CustomDesktopLabel instead of the Standard DesktopLabel, whenever you need your fake Button.
Has RaiseEvent been deprecated while I wasn’t looking?
Call works for all kinds of other things.
RaiseEvent is more appropriate there.
Update: It would actually be critical if the user-defined MouseDown had a return value the way the original one did. Call ignores the return value.
just came across your question. I just want to say I’m also using label buttons, and my way of knowing which one has been pressed, I use underline the label text, works great.