Can labels become clickable?

Discussion in 'Basic4ppc Wishlist' started by Sir Isaac, Jan 31, 2012.

  1. Sir Isaac

    Sir Isaac Member

    Can labels become clickable (as in good old VB)? They make nice flat buttons ;)
     
    Last edited: Jan 31, 2012
  2. barx

    barx Well-Known Member Licensed User

    Yes they have a 'Click' event

    Code:
    Sub label1_Click
       
    End Sub
     
  3. Sir Isaac

    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?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Labels in Windows Mobile do not have a click event.
     
  5. Sir Isaac

    Sir Isaac Member

    Well, I thought so.. Never mind, then.
     
    Last edited: Jan 31, 2012
  6. Basic4Life

    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.
     
  7. agraham

    agraham Expert Licensed 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.
    Code:
    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).
     
  8. barx

    barx Well-Known Member Licensed 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
     
  9. Sir Isaac

    Sir Isaac Member

    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: Feb 1, 2012
    rbw152 likes this.
  10. Sir Isaac

    Sir Isaac Member

    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: Feb 6, 2012
  11. agraham

    agraham Expert Licensed User

    That MSDN link is definititely the definitive reference to .NET.

    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.
     
  12. mjcoon

    mjcoon Well-Known Member Licensed User

    Send a PM to Cableguy!

    Mike.
     
  13. Sir Isaac

    Sir Isaac Member

    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: Feb 6, 2012
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice