FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OUTLOOK GROUP cCaption or cTitle changing
Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
OUTLOOK GROUP cCaption or cTitle changing
Posted: Thu Feb 09, 2012 04:40 PM
I have this GROUP definition:
Code (fw): Select all Collapse
@ -1, 156 OUTLOOK oOut1 ;               // desna strana od splitera
    SIZE 500, oWnd:nHeight() ;
    PIXEL ;
    FONT oFont ;
    OF oWnd

   DEFINE GROUP OF OUTLOOK oOut1     PROMPT "INITIAL CAPTION"       // Desni prostor gde će se prikazivati svi dijalozi



I would like to change this oOut1 group caption, depending on some conditions.
How can I do that?
I tried:

oOut1:cCaption := "first change"
and
oOut1:cTitle := "second change"

Neither works... :-)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: OUTLOOK GROUP cCaption or cTitle changing
Posted: Thu Feb 09, 2012 06:51 PM
Try this one :

REDEFINE GROUP oGrp1 ID 300 OF oDlg1
oGrp1:SetFont( oFont )
oGrp1:SetColor( nDTcolor, nDTcolor )
//oGrp1:lTransparent := .T.
oGrp1:SetText( "new Grouptext" ) // from TControl

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
Re: OUTLOOK GROUP cCaption or cTitle changing
Posted: Thu Feb 09, 2012 08:20 PM
Uwe, the problem seems to be different because I am using here the OUTLOOK GROUP:

Code (fw): Select all Collapse
@ -1, -1 OUTLOOK oOut ;                 // Leva strana od splitera
    SIZE 150, oWnd:nHeight() ;
    PIXEL ;
    FONT oFontOutlook COLOR CLR_RED ;
    OF oWnd

    @ -1, 156 OUTLOOK oOut1 ;               // desna strana od splitera
    SIZE 500, oWnd:nHeight() ;
    PIXEL ;
    FONT oFont ;
    OF oWnd

    DEFINE GROUP OF OUTLOOK oOut PROMPT "Izbor poslova"     // Left of splitter
    DEFINE GROUP OF OUTLOOK oOut1    PROMPT "OBRADA GOSTIJU"    // Right from splitter

        
    DEFINE BITMAP OF OUTLOOK oOut ;
          RESOURCE "newt1" ;        //
          PROMPT T2372;         
          WHEN lmenuGuests ;
          ACTION IF( oWnd:oTop == oToolBar1, ;
                    NIL,;
                    (oWnd:oTop := oToolbar1,; 
                     oToolBar1:Show(), oOut1:SetText("OBRADA GOSTIJU"), oOut1:refresh()) )
      
    DEFINE BITMAP OF OUTLOOK oOut ;
          RESOURCE "opent1" ;       //
          PROMPT T46;               
          WHEN lmenuGuests ;
          ACTION IF( oWnd:oTop == oToolBar2, ;
                    NIL,;
                    (oWnd:oTop := oToolbar2,;
                    oToolBar2:Show(), oOut1:SetText("REZERVACIJE"), oOut1:refresh() ))

The idea is when the user clicks on the FIRST button in a vertical row, the RIGHT group button text will change to "OBRADA GOSTIJU"
When the user clicks on the SECOND button in a vertical row, the RIGHT group button text would change to "REZERVACIJE"

It is just a part of code, but the idea is this.
As it is now, it doesn't change the caption of the RIGHT group button

This is how it looks:


Any idea
Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
Re: OUTLOOK GROUP cCaption or cTitle changing
Posted: Fri Feb 10, 2012 09:20 PM
Found the solution, probably not so elegant, but it serves the purpose...


oOut1:aGroup[1,1]:Cargo := "R E G I S T E R S", oOut1:refresh()

Continue the discussion