When i use
REDEFINE COLUMN XBROWSE ..... ARRAY .... AUTOSORT
no sort is functioning, when i click on headers!
Any changes to earlier versions of FWH?
When i use
REDEFINE COLUMN XBROWSE ..... ARRAY .... AUTOSORT
no sort is functioning, when i click on headers!
Any changes to earlier versions of FWH?
Gunther
Are you refering to 10.8 ?
Richard
#include "fivewin.ch"
#include "xbrowse.ch"
function main()
XBROWSER Directory() AUTOSORT
return nilREDEFINE COLUMN XBROWSE oList OF oWnd ID 100 ARRAY directory() AUTOSORT#include 'fivewin.ch'
#include 'xbrowse.ch'
function main()
local oDlg, oBrw
DEFINE DIALOG oDlg RESOURCE 'TEST' TITLE 'Array Autosort'
REDEFINE XBROWSE oBrw ID 101 OF oDlg ;
AUTOCOLS AUTOSORT ;
ARRAY Directory() ;
LINES CELL
ACTIVATE DIALOG oDlg CENTERED ON INIT ( oBrw:SetFocus(), .f. )
return nilTEST DIALOG 6, 15, 306, 227
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "TXBrowse demo"
FONT 8, "MS Sans Serif"
{
DEFPUSHBUTTON "OK", IDOK, 252, 211, 50, 14
CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 4, 5, 297, 202
}
Now I found the reason for this problem:
if i use oBrw:lAllowSwapping := .F. the autosort is not functioning!
METHOD HeaderLButtonDown( nMRow, nMCol, nFlags ) CLASS TXBrwColumn
if ::oBrw:nCaptured == 0 .and. ::oBrw:lAllowColSwapping if ::oBrw:nCaptured == 0 .and. ;
( ::oBrw:lAllowColSwapping .or. ! Empty( ::cSortOrder ) .or. ;
::bLClickHeader != nil )THANKS!!