U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » State of "button"
State of "button" [message #15143] Wed, 02 April 2008 17:32 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
OK, I've done it again! I had to write custom code to be able to do some very basic and common things with a button.

I'm a little unhappy with the state of button classes in U++. Button is by far the most advanced of them, but it does not feature a "down" state. A lot of my buttons need a down state. You can use ButtonOption, but that class is semi useless. Or you can use ToolButton, but that need a lot of visual tweaks to get it to behave nicely. Worst of all, if you change class, you have to modify a lot of code, since interfaces are different(one has Label, other has SetLabel).

So I propose a number of changes:
1. Uniform interface. Pretty self-explanatory.
2. Get rid of ButtonOption and add down state to Button (add typedef Button ButtonOption) or make ButtonOption inherit Button, add a label property, StyleDefault, etc.
3. Either add a StyleFlat to Button, or tweak ToolButton so that it can be used as a generic button.
4. Make styles compatible between button classes.

These are just some suggestions and the list is open, but before stable 2008 I think that it would be great if buttons wouldn't cause such headaches. I implemented partially on a by need bases a lot of these ideas, and would be relatively easy to gather them and implement this, but I need to know what you think.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Always on top?
Next Topic: How To call the Color picker window?
Goto Forum:
  


Current Time: Thu Jun 11 16:49:11 GMT+2 2026

Total time taken to generate the page: 0.00730 seconds