Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » ButtonOption is a cute little Toggle button
ButtonOption is a cute little Toggle button [message #24931] Fri, 05 February 2010 04:03 Go to previous message
alendar is currently offline  alendar
Messages: 47
Registered: January 2010
Location: Idaho, USA
Member
Anyone else try this? It's not in the layout manager as a widget or control, unless I missed it. No ones used it in the examples or the bazaar. I found one use in the ide, thank goodness.

Its a simple command button that behaves like an Option box, except its a command button. It doesn't take text, you have to set an image programmatically, or I guess you could chain it on the ITEM line in the .lay file.

It's very nifty. The only way I could get it into the layout was by editing the text of the layout instead of the GUI editor, though I probably could have used the User Class option? Doh!

But the text is very easy to edit.

For anyone newer than me:

LAYOUT(MainLayout, 304, 120)
ITEM(ButtonOption, playOrPause, LeftPosZ(48, 40).TopPosZ(4, 15))
END_LAYOUT

Then in a constructor you zap an image on it.

playOrPause = MyImages::play();

Will peek back in textprop.cpp to see how to capture the click event.


cd7651feeb698f6ac6cec1f6deda5e5b
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Menus and Toolbars
Next Topic: v.1952 errors
Goto Forum:
  


Current Time: Sun Apr 28 23:03:29 CEST 2024

Total time taken to generate the page: 0.03097 seconds