Change Groupheaders in Xbrowse on new Values

Change Groupheaders in Xbrowse on new Values

Postby Marc Venken » Sat Sep 09, 2017 8:03 am

We can change the header with this code :

oBrw1:bChange := { || oBrw2:cHeaders := { FIELD->CODE + '1', FIELD->CODE + '2', FIELD->CODE + '3' }, oBrw2:RefreshHeaders() }

But can we also change the Groupheader ?

aMaand = Array with 12 months
nMaand is actual month

On start, the groepheader is Januari, but when I change the combo to March, it should change.

The Combo :

Code: Select all  Expand view  RUN
@ 65,550 COMBOBOX oCbx VAR nMaand SIZE 100,400 PIXEL HEIGHTGET 18 OF oDlg  ;
      ITEMS aMaanden ON CHANGE ( ;
         tn := oRs:FieldPos( "T" + LTrim( Str( nMaand ) ) + "_1" ), ;
         oBrw[ 6 ]:Refresh() )
 




:SetGroupHeader( aMaanden[nMaand], oBrw[6]:oCol("T1"):nCreationOrder, oBrw[6]:oCol("M4"):nCreationOrder ) // header Januari = 0K

Tried :

oBrw[6]:bChange := { || oBrw[6]:cGroupHeader := { aMaanden[nMaand] }, oBrw[6]:RefreshHeaders() }
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1449
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Change Groupheaders in Xbrowse on new Values

Postby MGA » Sat Sep 09, 2017 10:06 pm

Marc,

oBrowse:SetGroupHeader( 'NOVO TITULO', 1, 14 )
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 29 guests