Can labels become clickable?

barx

Well-Known Member
Licensed User
Longtime User
Yes they have a 'Click' event

B4X:
Sub label1_Click
   
End Sub
 

Sir Isaac

Member
Nope, this doesn't work (at least, in 6.90). According to specifications provided (in .chm help), Labels neither have any events nor can be AddEvented, so to say. Am I wrong?
 

Basic4Life

Member
Licensed User
But they let the click "go through". So a simple work around is to create a panel with the same size of the label and then make that panel the parent of the label/ add the label to the panel. This way you can use the mouse events of the panel for your label.
 

agraham

Expert
Licensed User
Longtime User
On the desktop you could try altering the button FlatStyle to see if it looks like what you want. Obj1 is a Door library Oobject.
B4X:
Obj1.New1(False)
Obj1.FromControl("Button1")
Obj1.SetProperty("FlatStyle", "Flat")
Valid styles are "Flat", "Popup" (flat till mouse-overed) and "Standard" (three-dimensional) and "System" (however the OS wants to draw it).
 

barx

Well-Known Member
Licensed User
Longtime User
My bad. Sorry for the confusion. Like so many others I didn't realise we were in the ppc side of forum. Realy should split android off to its own forum.

Sorry again.

Sent from my HTC Vision using Tapatalk
 

Sir Isaac

Member
Really should split android off to its own forum.

And that would make forum search much easier on both sides of the track.

Something like "Show and search both/Only Android/Only PPC threads" on user's CP would be handy.
 
Last edited:

Sir Isaac

Member
On the desktop you could try altering the button FlatStyle to see if it looks like what you want. Obj1 is a Door library Oobject.
B4X:
Obj1.New1(False)
Obj1.FromControl("Button1")
Obj1.SetProperty("FlatStyle", "Flat")
Valid styles are "Flat", "Popup" (flat till mouse-overed) and "Standard" (three-dimensional) and "System" (however the OS wants to draw it).

1. Surely I'd love to spice up my (desktop) forms and code with .Net functionality. Think this is the right place to start the long journey.

2. Recently I've stumbled upon your (5-year) old remake of LinkLabel 1.1 library. Seems like a nice little job to use instead of clickable label (since it works even on device), and strangely enough, it is missing in Additional DLL List.
 
Last edited:

Sir Isaac

Member
I'd totally forgotten LinkLabel. It is actually a Panel, which is clickable on the device unlike a Label, with some blue text drawn on it.

And more to this, LinkLabel "panel" has Color, FontColor, FontSize, formatting (Bold and Underline) properties, so it isn't just "some blue text", strictly speaking.

Originally a panel? Well, feeding time for your mutants, Dr Agraham! :D
 
Last edited:
Top