nageswaragunupudi wrote:I do it often for EDIT_LISTBOX.
It should work for EDIT_GET_LISTBOX also. If it does not work, please let us know.
oCol:aEditListTxt := ArrTranspose( aNewArray )[ 2 ]
oCol:aEditListBound := ArrTranspose( aNewArray )[ 1 ]
nageswaragunupudi wrote:If you want to assign at runtime:
- Code: Select all Expand view
oCol:aEditListTxt := ArrTranspose( aNewArray )[ 2 ]
oCol:aEditListBound := ArrTranspose( aNewArray )[ 1 ]
nageswaragunupudi wrote:I checked and this is working for me. Please recheck and ensure that you assigned the second column to aEditListTxt and first column to aEditListBound. If you still have problem, please try to prepare a self-contained sample which we can build and test at our end.
From version 15.06 it is enough if you assign new multi-dim array to aEditListTxt at any time during runtime also. You need not do anything else.
#Include "FiveWin.ch"
#include "Xbrowse.ch"
*--------------------------------*
Function Test()
*--------------------------------*
Local oDlg,oBrw,aAlias:={{"","",""}}
DEFINE DIALOG oDlg SIZE 440,220 PIXEL TITLE 'XBrowse '
@ 10, 10 XBROWSE oBrw OF oDlg ;
COLUMNS 1,2,3;
ALIAS aAlias AUTOCOLS SIZE 200,70 PIXEL
WITH OBJECT oBrw
:aCols[1]:nEditType := EDIT_LISTBOX
:aCols[1]:aEditListTxt := {}
:aCols[1]:aEditListBound := {}
:CreateFromCode()
END
@ 5, 10 BUTTON "Set List BOX" SIZE 70, 10 ACTION Test1(oDlg,oBrw)
ACTIVATE DIALOG oDlg
Return Nil
*--------------------------------*
Function Test1(oDlg,oBrw)
*--------------------------------*
Local aList:={{1,"Canada"},;
{2,"US"},;
{3,"Australia"}}
oBrw:aCols[1]:nEditType := EDIT_LISTBOX
oBrw:aCols[1]:aEditListBound := ArrTranspose( aList)[ 1 ]
oBrw:aCols[1]:aEditListTxt := ArrTranspose( aList )[ 2 ]
oBrw:Refresh()
Return Nil
#Include "FiveWin.ch"
#include "Xbrowse.ch"
*--------------------------------*
Function Test()
*--------------------------------*
Local oDlg,oBrw,aAlias:={{"","",""}}
DEFINE DIALOG oDlg SIZE 440,220 PIXEL TITLE 'XBrowse '
@ 10, 10 XBROWSE oBrw OF oDlg ;
COLUMNS 1,2,3;
ALIAS aAlias AUTOCOLS SIZE 200,70 PIXEL
WITH OBJECT oBrw
:aCols[1]:nEditType := EDIT_LISTBOX /*IF i first assign aEditListTxt,aEditListBound blank array it will work fine */
:aCols[1]:aEditListTxt := {""}
:aCols[1]:aEditListBound := {""}
:CreateFromCode()
END
@ 5, 10 BUTTON "Set List BOX" SIZE 70, 10 ACTION Test1(oDlg,oBrw)
ACTIVATE DIALOG oDlg
Return Nil
*--------------------------------*
Function Test1(oDlg,oBrw)
*--------------------------------*
Local aList:={{1,"Canada"},;
{2,"US"},;
{3,"Australia"}}
oBrw:aCols[1]:nEditType := EDIT_LISTBOX
oBrw:aCols[1]:aEditListBound := ArrTranspose( aList)[ 1 ]
oBrw:aCols[1]:aEditListTxt := ArrTranspose( aList )[ 2 ]
oBrw:Refresh()
Return Nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 58 guests