I need to change sort order if i change column with arrow keys
and that is working good
But i want to remove sort bitmap showed on the header of the previous selected column
and show to the header of the new selected column
Please for solution
Code: Select all | Expand
//----------------------------------------------------------------------------//
function OK_MAT( cMat )
local lVrati := .f.
local oDlg,oBrw
local nIndeksOld := 1
DEFINE DIALOG oDlg SIZE 500,600 PIXEL TITLE "Artikli"
@ 30,10 XBROWSE oBrw SIZE -10,-30 PIXEL OF oDlg ;
DATASOURCE "MAT" ;
COLUMNS "MAT", "NAZ" ;
HEADERS "Artikl", "Naziv" ;
CELL LINES NOBORDER AUTOSORT FOOTERS ;
ON CHANGE ( IIF( nIndeksOld <> oBrw:SelectedCol():nCreationOrder ,;
( nIndeksOld := oBrw:SelectedCol():nCreationOrder ,;
MAT->( OrdSetFocus(oBrw:SelectedCol():nCreationOrder) ) ,;
; // HERE i need to remove sort bitmap on the header from the old selected column
; // and to show sort bitmap on the header of the new selected column
; // IF i click column header it is ok but not if i change it with arrow keys
oBrw:cSeek := "" ,;
oBrw:oSeek:Refresh() ,;
oBrw:Refresh() ;
) ,;
) ;
)
oBrw:aCols[ 1 ]:bLClickHeader := { |r,c,f,oCol | oBrw:SelectCol(oCol:nPos) }
oBrw:aCols[ 2 ]:bLClickHeader := { |r,c,f,oCol | oBrw:SelectCol(oCol:nPos) }
oBrw:lColChangeNotify := .t.
oBrw:CreateFromCode()
@ 10,10 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 180,10 PIXEL ;
OF oDlg COLOR CLR_HRED,CLR_YELLOW
ACTIVATE DIALOG oDlg CENTERED
MAT->( OrdSetFocus( 1 ) )
RETURN lVrati
Best regards,