Page 1 of 1
GROUPBOX
Posted: Tue Feb 27, 2024 6:32 pm
by Ruth
Dear friends,
may I ask for help again please...now i am trying to style a group-box and did this:
Code: Select all | Expand
REDEFINE GROUP oGroup ID 4021 OF oDlg COLOR CLR_MSPURPLE, CLR_ORANGE TRANSPARENT
but it seems to not change the background-color of the group-box. please can you help me once again. also ... may I ask about the meaning of TRANSPARENT.
Again kind regards
Ruth
Re: GROUPBOX
Posted: Tue Feb 27, 2024 7:16 pm
by TimStone
Try removing TRANSPARENT. That is allowing the background to be seen in the control.
REDEFINE GROUP [ <oGroup> ];
[ LABEL | PROMPT <cLabel> ];
[ ID <nId> ];
[ OF | WINDOW | DIALOG <oWnd> ];
[ COLOR <cClrFore> [, <nClrBack> ] ];
[ FONT <oFont> ];
[ TRANSPARENT ]
<nTop> , <nLeft> To specify the top and left coordinates.
<oGroup> The variable to containt the object.
<nRight>, <nBottom> To specify the right and bottom coordinates.
<cLabel> The caption of the group.
<oWnd> The window or dialogbox container of this control.
<cClrFore> The foreground color of the group.
<nClrBack> The background color of the group.
<oFont> A reference to the font object used for the Group control.
<nId> The resource identifier for this control.
CLAUSES
PIXEL To specify pixel corrdinates.
DESIGN To drag around the control using the mouse.
TRANSPARENT To make the Group transparent.
Re: GROUPBOX
Posted: Tue Feb 27, 2024 7:22 pm
by karinha
Code: Select all | Expand
#include "FiveWin.ch"
#Define CLR_MSPURPLE nRGB( 0, 120, 215 ) //-> Purpura.
#Define CLR_ORANGE nRGB( 255, 165, 000 ) //-> Orange - Laranja
FUNCTION Main()
local oDlg, oGroup, oFont
// SetDlgGradient( { { 1, RGB( 199, 150, 237 ), RGB( 237, 242, 248 ) } } )
SetDlgGradient( { { 1, RGB( 000, 120, 215 ), RGB( 000, 165, 215 ) } } )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -16 BOLD
DEFINE DIALOG oDlg RESOURCE "Test"
oDlg:lHelpIcon := .F.
REDEFINE GROUP oGroup ID 4001 OF oDlg PROMPT "Ruth: This is a test" ;
COLOR CLR_ORANGE TRANSPARENT FONT oFont
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETURN NIL
/* // FILE.RC
#include <windows.h>
#ifndef __64__
1 24 "WinXP/WindowsXP.Manifest"
#endif
test DIALOGEX DISCARDABLE 6, 18, 322, 174
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "Tahoma"
{
CONTROL "OK", IDOK, "Button", WS_TABSTOP, 268, 8, 45, 15
CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 268, 28, 45, 15
CONTROL "Group-box", 4001, "Button", BS_GROUPBOX, 20, 80, 236, 80
}
*/
// FIN / END - kapiabafwh@gmail.com
Regards, saludos
Re: GROUPBOX
Posted: Tue Feb 27, 2024 8:37 pm
by Ruth
Thank you very, very much for your ... now it is displaying as I wished...wonderful
may I check if I got TRANSPARENT right please ... is it overwriting the
meaning if I put
CLR_ORANGE is omitted and the background-color of the parent-container is shown?
Again thank you so much for your help.
Kind regards and until soon
Ruth