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 » U++ Widgets - General questions or Mixed problems » Dynamic Ctrl frame
Re: Dynamic Ctrl frame [message #53747 is a reply to message #53746] Mon, 27 April 2020 13:48 Go to previous messageGo to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello Koldo,
I've been playing around with Chameleon lately and
I think you need to look at the EditField::Style.edge[]

struct Style : ChStyle<Style> {
		Color paper;
		Color disabled;
		Color focus;
		Color invalid;
		Color text, textdisabled;
		Color selected, selectedtext;
		Color selected0, selectedtext0; // If does not have focus...
		[b]Value edge[4];[/b] // border (for various active edge states)
		Value coloredge; // border mask for adding color, e.g. round borders with red Error
		bool  activeedge;
		int   vfm;
	};


and using:
enum {
	CTRL_NORMAL, CTRL_HOT, CTRL_PRESSED, CTRL_DISABLED,
	CTRL_CHECKED, CTRL_HOTCHECKED
};


So if you set edge[CTRL_HOT] to the right style image, you will probably get what you want

If you want to apply it to all EditField children, add at application init:
EditField::StyleDefault.Write().edge[CTRL_HOT] = YoureStyle; 


Note: this will only work for all EditField children ... not all Ctrls

If you want to apply it to a specfic Ctrl (not all), this should do the trick :
Quote:

static EditField::Style myCtrlStyle = EditField::StyleDefault();
myCtrlStyle.edge[CTRL_HOT] = YoureStyle;
...
myCtrl.SetStyle(myCtrlStyle);


You may need to replace 'EditField::Style' by '<EditFieldChildType>::Style' (depending on you're EditXxxx Ctrl)

[Updated on: Mon, 27 April 2020 13:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Overriding Key method disable tab browsing
Next Topic: SMTP library error?
Goto Forum:
  


Current Time: Sun May 12 23:56:36 CEST 2024

Total time taken to generate the page: 0.03469 seconds