[gtkada] about using text as objects??

Jean-Etienne Doucet doucet at laas.fr
Fri Feb 21 10:21:21 CET 2003


From: luix <luixal at SoftHome.net>
| 
| 	I'm trying to create one of this boxes that are shown as simply text but 
| you can click in
| one of the lines and by doing this your're selecting the option shown in 
| that line.
| 
| 	I don't know if you can understand what I'm trying to say... Is that king 
| of "menu" that
| you can see when you select the language in some aplications...
| 
| 	Well, I don't know how to do something similar to that and I need to do it.
| 
| 	If someone has an idea about what I'm saying please tell me something,
| 
| 	thanks,
| 	luis
| 

I don't know if this is the best way to do that, but I'd do it the following way:

  - put the text (as two or more Gtk_Labels) in a Gtk_Event_Box;
  - use Add_Events to make it sensitive to Button_Press and Button_Release;
  - get the event in the callback (2nd parameter),
  - get the cursor position from the event.

Another way is to use Gtk_Option_Menu.

--jed--



More information about the gtkada mailing list