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 |
|
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.
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 );
}
|
|
|
|
Re: How to modify the back colour of a Static Text [message #27304 is a reply to message #27298] |
Sun, 11 July 2010 17:10 |
281264
Messages: 270 Registered: June 2010 Location: Spain
|
Experienced Member |
|
|
Additional questions:
1.-How can I show the cursor’s coordinates in two labels located in the TopWindow, not within the "custom" widget?.
2.- If I derive the class from Ctrl class, then it works fine (i.e. it shows mouse’s coordinates WITHIN itself). However, I derive the class from either Label or StaticRect, it doesn’t work. Why?.
Thanks chaps,
Javier
|
|
|
Goto Forum:
Current Time: Fri Mar 29 14:33:53 CET 2024
Total time taken to generate the page: 0.01464 seconds
|