Hi,
this is a self-contained sample that shows the problem.
if you select "Show browse" then the xbrowse will be showed and closed automatically for 30 times,
check the xbrowse fonts and you will see that it will be crazy after 3-4 time the xbrowse is showed.
Perhaps the problem is relate to the xbrowse using in a ownClient and folder environment.
Any - urgent - solution ?
Thanks in advance.
----
#include "FiveWin.ch"
#include "folder.ch"
#include "xbrowse.ch"
function Main()
local oBtn, oDlg,aNames,aArray, oBrw2, oCol
DEFINE WINDOW oWnd ;
Title "test";
color nrgb(0,0,0),nrgb(255,255,255);
MENU BUILDMENU();
MDI
ACTIVATE WINDOW oWnd MAXIMIZED
function BuildMenu()
local oMenu
local oFirst, oSecond
local oItHelp
MENU oMenu
MENUITEM "&Test"
MENU
MENUITEM "Show xbrowse" ;
ACTION TestBrowse()
ENDMENU
ENDMENU
return oMenu
function testbrowse()
local oBrw1, obrw2,oBtn,i,ofld
aArray:=BrwGetData()
for i:=1 to 30
@1,1 XBROWSE oBrw1 ARRAY AARRAY OF oWnd:oWndClient SIZE 200,400
ADD COLUMN oCol TO XBROWSE oBrw1 DATA ARRAY ELEM 1;
HEADER "Num" SIZE 80
ADD COLUMN oCol TO XBROWSE oBrw1 DATA ARRAY ELEM 2;
HEADER "Type" SIZE 200
oBrw1:CreateFromCode()
@ 1, 40 FOLDER oFld PROMPT "&Test" ;
OF oWnd:oWndClient SIZE 500,500
@2,5 XBROWSE oBrw2 ARRAY AARRAY OF oFld SIZE 200,400
ADD COLUMN oCol TO XBROWSE oBrw2 DATA ARRAY ELEM 1;
HEADER "Num" SIZE 80
ADD COLUMN oCol TO XBROWSE oBrw2 DATA ARRAY ELEM 2;
HEADER "Type" SIZE 200
oBrw2:CreateFromCode()
sysrefresh()
syswait(1)
if i<30
oBrw1:End()
oBrw2:End()
oFld:End()
endif
next
return
Function BrwGetData()
local aArray
aArray:=array(0,4)
aadd(aArray,{1,"RED"})
aadd(aArray,{2,"GREEN"})
aadd(aArray,{2,"GREEN"})
aadd(aArray,{1,"RED"})
return(aArray)