GROUPBOX

GROUPBOX

Postby Ruth » Tue Feb 27, 2024 6:32 pm

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 view  RUN
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


Image
User avatar
Ruth
 
Posts: 172
Joined: Fri Dec 07, 2007 1:26 pm

Re: GROUPBOX

Postby TimStone » Tue Feb 27, 2024 7:16 pm

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.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: GROUPBOX

Postby karinha » Tue Feb 27, 2024 7:22 pm

Code: Select all  Expand view  RUN

#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
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: GROUPBOX

Postby Ruth » Tue Feb 27, 2024 8:37 pm

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
Code: Select all  Expand view  RUN
| <nClrBack> | The background color of the group.    |


meaning if I put
Code: Select all  Expand view  RUN
COLOR CLR_MSPURPLE, CLR_ORANGE TRANSPARENT


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
User avatar
Ruth
 
Posts: 172
Joined: Fri Dec 07, 2007 1:26 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 76 guests