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 » U++ Library support » Look and Chameleon Technology » Need wider SpinButton -- How?
Need wider SpinButton -- How? [message #14795] Sat, 15 March 2008 02:11 Go to next message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
We need wider spin buttons for EditDoubleSpin.

Upp code has width set to 12, we need 40 because of touch
screen resolution and gloved hand requirement.

How do I set SpinButtons width = 40 ?
Seems like there's missing API to do this, plus I don't
understand Chameleon well enough to solve the problem.


--jlf
Re: Need wider SpinButton -- How? [message #14796 is a reply to message #14795] Sat, 15 March 2008 08:49 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1425
Registered: September 2007
Ultimate Contributor
The required API is not missing. Rather than adding such API directly to the interface, U++ uses Chameleon Styles.

If you want to change the width of the spin buttons in the entire application, use something like this at an early point in the applications runtime (in an initialization step or if only one window, in the window constructor):
SpinButtons::Style& style = SpinButtons::StyleDefault().Write();
style.width = 40;

Now all spin buttons will have the given width.

If you only want to change some of the spin buttons, declare:
SpinButtons::Style style;

somewhere where it will not go out of scope before the control you want to modify and use:
style = SpinButtons::StyleDefault();
style.width = 40;
spin.SetStyle(style);


BUG:
I just noticed that the lower button in the spin control has some chameleon skin tilling issues only visible when it's hight is larger than usual. This is only a visual bug and will try to solve it later today.
Re: Need wider SpinButton -- How? [message #14818 is a reply to message #14796] Sat, 15 March 2008 23:24 Go to previous messageGo to next message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
I've used the first form and changed all spin buttons.

This is excellant and works great. Its funny how silly simple
this is and yet evaded my examination.

Thank you very much.
Re: Need wider SpinButton -- How? [message #14819 is a reply to message #14796] Sat, 15 March 2008 23:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14162
Registered: November 2005
Ultimate Member
cbpporter wrote on Sat, 15 March 2008 03:49



BUG:
I just noticed that the lower button in the spin control has some chameleon skin tilling issues only visible when it's hight is larger than usual. This is only a visual bug and will try to solve it later today.


In Win32, this might be the feature, not but. This is what Win32 theming API paints if you want it big Smile

Mirek
Re: Need wider SpinButton -- How? [message #14828 is a reply to message #14819] Sun, 16 March 2008 20:58 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1425
Registered: September 2007
Ultimate Contributor
luzr wrote on Sun, 16 March 2008 00:54



In Win32, this might be the feature, not but. This is what Win32 theming API paints if you want it big Smile

Mirek

Well, it may be a feature, but it's an ugly one Smile. But since I couldn't really fix it without ruining it look an introducing a lot of 1-2 pixel wide borders, which is too much for the small space inside that edit widget, I think I'll manage without using large spin buttons.

PS: The space inside the edit is quite small.
if the button where on the outside, you could get it a little bigger. Is there a way to modify the order in which the frame is applied to achieve this?
Re: Need wider SpinButton -- How? [message #14829 is a reply to message #14828] Sun, 16 March 2008 21:04 Go to previous message
mirek is currently offline  mirek
Messages: 14162
Registered: November 2005
Ultimate Member
Not yet.
Previous Topic: DropList SetFrame appearance problem
Next Topic: Very strange issue with WindowBlinds
Goto Forum:
  


Current Time: Sat Dec 14 13:57:40 CET 2024

Total time taken to generate the page: 0.02255 seconds