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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Different color for three state option button
Re: Different color for three state option button [message #2415 is a reply to message #2410] Wed, 12 April 2006 11:55 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1207
Registered: March 2006
Location: Italy
Senior Contributor
fudadmin wrote on Wed, 12 April 2006 03:38

Ok, Luigi, it' time for you to learn image designer... Smile
Try and tell how it works...
P.S I haven't tested the logic and all functionality properly. This is a quick sample. Try to improve...
Any questions - just ask...
Unzip into ForlanoOption folder (no folders inside!)


Aris,

It works as all your code although this time it is not at all friendly and in the laizy people style Smile

If I desire a three state button with no standard images I think should be enough a declaration as this:
btnOpt.Add("Label_text", img1thState, img2thState, img3thState);

where img1thState, img2thState, img3thState are the images defined in the *.iml file.
Moreover it could be useful a method that set the position of the text with respect the image:
btnOpt.TextvsImage(LEFT); // test at the left of the image
btnOpt.TextvsImage(RIGHT); // test at the left of the image

The bottom and top case can be resolved with a separate label below of upper the button. Then, in the U++ style, should be possible the following line:
btnOpt.Add("Label_text", img1thState, img2thState, img3thState).TextvsImage(LEFT);

The same for a two state button:
btnOpt.Add("Label_text", img1thState, img2thState).TextvsImage(LEFT);


The minimum dimension of the button should be calculate considering the text lenght and the greatest of the three image dimension.
If I've not said silly thing I'll put this post in the wish list.

Luigi
 
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: F2 tree editor...
Next Topic: OptionImage ctrl: how to make it better...
Goto Forum:
  


Current Time: Sat Jul 05 17:55:22 CEST 2025

Total time taken to generate the page: 0.03705 seconds