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 » Community » Newbie corner » How to modify the back colour of a Static Text
Re: How to modify the back colour of a Static Text [message #27286 is a reply to message #27281] Sun, 11 July 2010 02:12 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Or simple - Add StaticRect behind of StaticText.

StaticRect has Color() member. Use it.

dlg.txt = t_("You do not have any choice. Select the appropriate job and click OK."); //set text of foreground control
dlg.txt.SetInk(White()).SetFont(StdFont().Bold()); //set color of foreground control
dlg.txt_back.Color(LtRed()); //set color of background control.


Razz

PS
Text version of my .lay file.
LAYOUT(PositionSelectLayout, 480, 288)
	ITEM(StaticRect, txt_back, HSizePosZ(16, 16).TopPosZ(16, 23))
	ITEM(StaticText, txt, SetAlign(ALIGN_CENTER).HSizePosZ(16, 16).TopPosZ(16, 23))
	ITEM(Button, ok, SetLabel(t_("OK")).HCenterPosZ(136, -84).BottomPosZ(16, 48))
	ITEM(Button, cancelimport, SetLabel(t_("Stop import")).HCenterPosZ(136, 84).BottomPosZ(16, 48))
END_LAYOUT



SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: guides and tutorials for a absolute beginner?
Next Topic: What is the difference between Splitter and SplitterFrame?
Goto Forum:
  


Current Time: Thu May 09 19:10:36 CEST 2024

Total time taken to generate the page: 0.01865 seconds