News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
How to bind a key event for widget?
Author Message
MrBill
Junior Member
**


Posts: 14
Group: Registered
Joined: Mar 2008
Status: Offline
Reputation: 0
Post: #1
RE: How to bind a key event for widget?

Code:
do widget= fltk:Fl_Input(0,0,0,0,"")
widget:callback(input_cb)
widget:when(8) -- this is the constant for the Enter key


Don't use that code exactly as its missing dimensions and labels
But the widget:when(8) is what you are looking for.

There is a list of constants for events and I always forget where they are, either somewhere in the forums, in murgaLua examples, or maybe in Mikshaws widget example.

I use Fluid and then convert to lua so thats how I get it done, usually.

09-14-2008 07:03 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
RE: How to bind a key event for widget? - MrBill - 09-14-2008 07:03 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: