TWbrowse resize

Post Reply
pawelu
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland
Contact:

TWbrowse resize

Post by pawelu »

Hello

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

#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.
pawelu
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland
Contact:

Post by pawelu »

Enrico,

Effect still this same ... message not found.

Pawel
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Then it should mean that SetSize() method is still not implemented, at least for TWBrowse.

Antonio?

EMG
Post Reply