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 » Switch Control
Re: Switch Control, always displayed horizontaly [message #30107 is a reply to message #30105] Thu, 09 December 2010 13:08 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

ratah wrote on Thu, 09 December 2010 12:32

Hi everybody,

I want to arrange swich items in my manner. How to do I can't!!

Thank you

Hi Ratah,

The switch widget chooses between vertical and horizontal layout based on its size. If you make it tall and narrow it will be vertical, if you make it short and wide it will became horizontal. Changing the size of the widget at runtime (e.g. when the layout is resized), will recompute the best layout as well.

In case you are looking for way how to manage this manually, or for some more complex layouts like columns, then I'm afraid there is no such thing in Switch. You could of course derive your own widget based on Switch - the only thing you would have to override is the Paint() method. It should be quite easy, have a look at CtrlLib/Switch.cpp, line 152. It is only ~50 lines of code, most of which could be reused.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pretty GUIs
Next Topic: document icon, how to?
Goto Forum:
  


Current Time: Mon Jun 09 11:56:51 CEST 2025

Total time taken to generate the page: 0.05319 seconds