1. RE: [Win32Lib] Click on Label
- Posted by Jerry Story <jstory at edmc.net> Feb 04, 2004
- 516 views
euphoric wrote: > > > Can a label respond to an onClick event? (I searched the message > >archive and couldn't find the answer, which is odd. I thought I > >remember this coming up before.) I found a little trick. Put a button under the label. Then the "label" responds to clicking. Clicking puts the button on top so you need to put the label back on top. Jerry Story
2. RE: [Win32Lib] Click on Label
- Posted by CoJaBo <cojabo at suscom.net> Feb 04, 2004
- 481 views
Is this what you mean: SS_NOTIFY will enable events -- code generated by Win32Lib IDE v0.18.3 include Win32Lib.ew without warning -------------------------------------------------------------------------------- -- Window w constant w = createEx( Window, "", 0, Default, Default, 400, 300, 0, 0 ) constant LText2 = createEx( LText, "Click here", w, 112, 32, 148, 20, or_all({SS_NOTIFY}), 0 )--SS_NOTIFY will enable events --------------------------------------------------------- -------------------------------------------------------------------------------- procedure LText2_onClick (integer self, integer event, sequence params)--params is () puts(1,"Label clicked") end procedure setHandler( LText2, w32HClick, routine_id("LText2_onClick")) WinMain( w,Normal ) euphoric wrote: > > > Derek Parnell wrote: > > >...if it's okay to just respond to a click anywhere in the text,then you > >can use a simple child window. > > > >Here is an extended example program... > > > > > <code snipped> > > Yeah, that will work fine. > > To satiate curiosity, why don't labels respond to events? > >
3. RE: [Win32Lib] Click on Label
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Feb 05, 2004
- 483 views
> -----Original Message----- > From: C. K. Lester [mailto:euphoric at cklester.com] > Subject: Re: [Win32Lib] Click on Label > > > > CoJaBo wrote: > > >Is this what you mean: > >SS_NOTIFY will enable events > > > > > Hey, thanks CojaBo! That will probably be easier than > managing a child > window... right? :) > >From your earlier request, I thought that you had found out about the SS_NOTIFY flag but still wanted something else. That's why I gave you the child window example. But if you only need a label to respond to a click anywhere in it, then SS_NOTIFY is the better method. -- Derek