How to change TWBrowse control size in program code ? I found Resize method in wbrowse source but method call produce error "Message not found TWBrowse : ReSize".
Thanks,
Pawel
- Code: Select all Expand view RUN
#Include 'FwCe.Ch'
#Define EVENT_SIP 224
Function TestMove ()
Local oWnd := Nil
Local oBrw := Nil
Local aStr := {}
Local i := 0
AAdd (aStr, {'F1', 'C', 10, 0})
AAdd (aStr, {'F2', 'N', 5, 0})
DbCreate ('TestMove', aStr)
Use TestMove New
For i := 1 To 20
TestMove->(DbAppend ())
TestMove->F1 := PadL (i, 2)
TestMove->F2 := i
Next
TestMove->(DbGoTop ())
Define Window oWnd Title 'Test Move'
@ 2, 0 ListBox oBrw ;
Fields ;
TestMove->F1, ;
TransForm (TestMove->F2, '99999') ;
Alias 'TestMove' ;
FieldSizes 150, 50 ;
Header 'Col.1', 'Col.2' ;
Size 240, 141 ;
Pixel
oWnd : bSettingChange := {|xVal| WmEvent (xVal, oBrw)}
Activate Window oWnd
TestMove->(DbCloseArea ())
FErase ('TestMove.Dbf')
Return .T.
Function WmEvent (xVal, oBrw)
Do Case
Case xVal == EVENT_SIP
WbrResize (oBrw)
EndCase
Return .T.
Function WbrResize (oBrw)
// first parameter value in Resize () ?
If SipInfo ()
oBrw : ReSize (0, 240, 127)
Else
oBrw : ReSize (0, 240, 141)
Endif
Return .T.