Can I implement a function when clicking on the top of a column in a TsBrowse.
If so, how can I initate that?
In Windows apps you can click on the top of a column and it changes its sequence in alphabetical order f.i.
I use TsBrowse with great pleasure in all my apps.
Thanks for a reply.
Jules
[/b]
Clicking on a TsBrowse Column, can it execute a Function?
-
- Posts: 21
- Joined: Mon Mar 20, 2006 12:48 pm
- Location: Netherlands
-
- Posts: 21
- Joined: Mon Mar 20, 2006 12:48 pm
- Location: Netherlands
Clicking on a TsBrowse Column
TNHOE,
Thanks for respnding,
Can you give more detailed info?
Where should I place the command: oBrW:aActions
How could the Array look like ,example
Should the function: msgstop('col 1') define the order of records ?
Thanks again.
Jules
Thanks for respnding,
Can you give more detailed info?
Where should I place the command: oBrW:aActions
How could the Array look like ,example
Should the function: msgstop('col 1') define the order of records ?
Thanks again.
Jules
select('invoice') // fields: invoice,date,custcode
REDEFINE BROWSE oBrw ALIAS "invoice" ID 101 OF oDlg
oBrw:LoadFields( .T. ) // load all fields from dbf
oBrw:aActions:={ {|| fCol('1') },{|| fCol('2') },{|| fCol('3') } }
:
:
return .t.
// Your user defined function below,
function fCol(cX)
msginfo('Header Column clicked : '+cX)
select('invoice')
do case
case cX='1'
set order to tag invoice
case cX='2'
set order to tag date
case cX='3'
set order to tag custcode
endcase
oBrw:refresh()
return .t.
REDEFINE BROWSE oBrw ALIAS "invoice" ID 101 OF oDlg
oBrw:LoadFields( .T. ) // load all fields from dbf
oBrw:aActions:={ {|| fCol('1') },{|| fCol('2') },{|| fCol('3') } }
:
:
return .t.
// Your user defined function below,
function fCol(cX)
msginfo('Header Column clicked : '+cX)
select('invoice')
do case
case cX='1'
set order to tag invoice
case cX='2'
set order to tag date
case cX='3'
set order to tag custcode
endcase
oBrw:refresh()
return .t.