Xbrowse - header-update at runtime ?

Xbrowse - header-update at runtime ?

Postby ukoenig » Fri Aug 12, 2016 1: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()

Image

any solution ?

regards
Uwe :?:
Last edited by ukoenig on Fri Aug 12, 2016 1:35 pm, edited 1 time in total.
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: Xbrowse - header-update at runtime ?

Postby Marc Vanzegbroeck » Fri Aug 12, 2016 1:29 pm

Uwe,

You can try with
Code: Select all  Expand view
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Xbrowse - header-update at runtime ?

Postby ukoenig » Fri Aug 12, 2016 1:56 pm

Marc,
thank You very much

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

Code: Select all  Expand view

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: Select all  Expand view

//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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 96 guests

cron