FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xbrowse - header-update at runtime ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Xbrowse - header-update at runtime ?
Posted: Fri Aug 12, 2016 01:23 PM
Hello,

I have a problem updating the header-text at runtime
1. selecting a new start-date from the calendar
2. saving the new date and repaint the header with start-date + 27 days
I tested to refresh the header but didn' t work

RefreshHeaders()



any solution ?

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: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Xbrowse - header-update at runtime ?
Posted: Fri Aug 12, 2016 01:29 PM
Uwe,

You can try with
Code (fw): Select all Collapse
oBrw:aCols[5]:cHeader := myheader()
oBrw:refresh()

Myheader() returns the header you want to show.
This will update the header of column 5.
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Xbrowse - header-update at runtime ?
Posted: Fri Aug 12, 2016 01:56 PM
Marc,
thank You very much

:aCols[I]:cHeader := aZVal[X] is defined as :

Code (fw): Select all Collapse
WITH OBJECT oBrw1
     I := 5
     X := 1
     FOR I := 5 TO 32
          :aCols[I]:nWidth  := 90
          :aCols[I]:nDataStrAlign   := AL_CENTER
          :aCols[I]:nHeadStrAlign   := AL_CENTER
          :aCols[I]:nEditType   := EDIT_GET_LISTBOX
          :aCols[I]:aEditListBound  := ;
          :aCols[I]:aEditListTxt    := { "F", "M", "S", "F-M-S", "Frei", "Urlaub", "Krank" }
          :aCols[I]:bOnPostEdit := { | o, v | PTSAVE( v, oBrw1 ) }
          // header-vars
          :aCols[I]:cHeader := aZVal[X] // !!!!!!!
         X++
     NEXT
     ....
     ....
     ....
END


Changed using FIELDNAMES :

I := 5
FOR I := 5 TO 32
X := LTRIM(STR(I-4)) // ]("PFLEGER")->TAG1 - 28 //29
:aCols[I]:nWidth := 90
:aCols[I]:nDataStrAlign := AL_CENTER
:aCols[I]:nHeadStrAlign := AL_CENTER
:aCols[I]:nEditType := EDIT_GET_LISTBOX
:aCols[I]:aEditListBound := ;
:aCols[I]:aEditListTxt := { "F", "M", "S", "F-M-S", "Frei", "Urlaub", "Krank" }
:aCols[I]:bOnPostEdit := { | o, v | PTSAVE( v, oBrw6 ) }
:aCols[I]:cHeader := ("PFLEGER")->TAG&X // aZVal[X]
NEXT

it works from inside the save-function like :

Code (fw): Select all Collapse
//COLUMNS { "NACHNAME", "VORNAME", "SIGNAL", "QUALIFIKAT", ;
//"TAG1", "TAG2", "TAG3", "TAG4", "TAG5", "TAG6", "TAG7", ; // FIELDS  5 - 32
//"TAG8", "TAG9", "TAG10", "TAG11", "TAG12", "TAG13", "TAG14", ;
//"TAG15", "TAG16", "TAG17", "TAG18", "TAG19", "TAG20", "TAG21", ;
//"TAG22", "TAG23", "TAG24", "TAG25", "TAG26", "TAG27", "TAG28" } 

I := 5
X := 0
Y := "1"
IF NET_RLOCK( 3 )
     FOR I := 5 TO 32
         X++
         Y := LTRIM(STR(X))
         oBrw1:aCols[I]:cHeader := ("PARAM")->DATUM&Y
     NEXT
ENDIF
COMMIT
NET_ULOCK()

oBrw1:RefreshHeaders()

//oBrw1:refresh()
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.

Continue the discussion