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 » LabelBox style
Re: LabelBox style [message #53745 is a reply to message #53742] Sun, 26 April 2020 15:42 Go to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
I finally found how to do it

It doesn't allow me to fine tweek the label, but it will do for now.
struct sChLook_LabelBox {
	Image img;
};

Value Make_ChLook_LabelBox(const Image& img)
{
	sChLook_LabelBox x;
	x.img = MakeButton(8, img, 2, Blue());
	return RawToValue(x);
}

Value ChLookFn_LabelBox(Draw& w, const Rect& r, const Value& v, int op, Color ink) {
	
	if( v.Is<sChLook_LabelBox>() )
	{
		const sChLook_LabelBox& e = v.To<sChLook_LabelBox>();
		ChPaint(w, r, e.img);
		return 1;
	}
	return Null;
}

INITBLOCK {
	ChLookFn(ChLookFn_LabelBox);
}


And at application init:
	static const Value myLabelBoxLook = Make_ChLook_LabelBox(GraphCtrl_DemoImg::CTRL_BACKGND());
	LabelBox::SetLook( myLabelBoxLook );
 
Read Message
Read Message
Previous Topic: Dark theme issues
Next Topic: how to change controls to old 3D instead win3.1/10 look?
Goto Forum:
  


Current Time: Mon May 06 22:46:50 CEST 2024

Total time taken to generate the page: 0.02199 seconds