When resize only the xbrowses and the says not resizing right , why ?
- Code: Select all Expand view RUN
#include "FiveWin.ch"
#include "xbrowse.ch"
Function Test()
Local oDlg,oBrw1,oBrw2
Local oSay[2]
Local oFonftBold
Local oBtnok,oBtnclose
USE CUSTOMER ALIAS CU
DEFINE FONT oFontBold NAME "TAHOMA" SIZE 0,-14 BOLD
DEFINE DIALOG oDlg SIZE 878, 570 PIXEL; // SIZE 878, 570
Title "Test Resize" ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME )
@ 0, 12 SAY oSay[1] Prompt "First xbrowse " size 100, 12 OF oDlg font oFontBold
@ 0, 52 SAY oSay[2] Prompt "Second xbrowse " size 100, 12 OF oDlg Font oFontBold
@ 2, 2 XBROWSE oBrw1 OF oDlg SIZE 200,90 ;
AUTOCOLS ALIAS 'CUST' NOBORDER
oBrw1:nMarqueeStyle = MARQSTYLE_HIGHLWIN7
oBrw1:CreateFromCode()
@ 2, 28 XBROWSE oBrw2 OF oDlg SIZE 200,90 ;
AUTOCOLS ALIAS 'CUST' NOBORDER
oBrw2:nMarqueeStyle = MARQSTYLE_HIGHLWIN7
oBrw2:CreateFromCode()
oDlg:bResized := { || ;
oRect := oDlg:GetCliRect() ,;
oBrw1:nHeight := oRect:nBottom - 120 ,;
oBrw1:nWidth := oRect:nLeft +420 ,;
oBrw2:nHeight := oRect:nBottom - 120 ,;
oBrw2:nWidth := oRect:nRight - 100 ,;
oBrw2:nleft := oRect:nright -380 ,;
oBtnOK:nTop := oRect:nBottom - 40 ,;
oBtnOK:nLeft := oRect:nRight - 200 ,;
oBtnClose:nTop := oRect:nBottom - 40 ,;
oBtnClose:nLeft := oRect:nRight - 100 ,;
oSay[1]:nTop := oRect:nTop +5 ,;
oSay[2]:nTop := oRect:nTop +5 ,;
oSay[1]:nLeft := oRect:nLeft +160 ,;
oSay[2]:nLeft := oRect:nright -290 }
@ 10,250 Button oBtnClose PROMPT "Exit" ;
SIZE 40,16 PIXEL OF oDlg ;
ACTION nil
@ 195,200 Button oBtnOK PROMPT "&Ok" ;
SIZE 42,16 PIXEL OF oDlg ;
ACTION nil
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT (ResizeDialog( oDlg,oBrw1,oBrw2,oBtnclose,oBtnok,oSay))
RELEASE FONT oFontBold
return nil
//-------------------------------------------------------------//
Function ResizeDialog( oDlg,oBrw1,oBrw2,oBtnclose,oBtnok,oSay)
Local oRect := oDlg:GetCliRect()
oBrw1:nHeight := oRect:nBottom - 120
oBrw1:nWidth := oRect:nLeft +420
oBrw2:nHeight := oRect:nBottom - 120
oBrw2:nWidth := oRect:nright -500
oBrw2:nleft := oRect:nLeft +470
oSay[1]:nTop := oRect:nTop +5
oSay[2]:nTop := oRect:nTop +5
oSay[1]:nLeft := oRect:nLeft +160
oSay[2]:nLeft := oRect:nright -290
oBtnClose:nTop := oRect:nBottom - 40
oBtnClose:nLeft := oRect:nRight - 100
oBtnOK:nTop := oRect:nBottom - 40
oBtnOK:nLeft := oRect:nRight - 200
return ni
when you resize the xbrowse rect must have the same meausure , how resolve ?