OUTLOOK GROUP cCaption or cTitle changing

OUTLOOK GROUP cCaption or cTitle changing

Postby codemaker » Thu Feb 09, 2012 4:40 pm

I have this GROUP definition:
Code: Select all  Expand view

@ -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... :(
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: OUTLOOK GROUP cCaption or cTitle changing

Postby ukoenig » Thu Feb 09, 2012 6: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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: OUTLOOK GROUP cCaption or cTitle changing

Postby codemaker » Thu Feb 09, 2012 8:20 pm

Uwe, the problem seems to be different because I am using here the OUTLOOK GROUP:

Code: Select all  Expand view

@ -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:
Image

Any idea
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: OUTLOOK GROUP cCaption or cTitle changing

Postby codemaker » Fri Feb 10, 2012 9: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()
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests