TWbrowse resize

TWbrowse resize

Postby pawelu » Tue May 02, 2006 11:56 am

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

Re: TWbrowse resize

Postby Enrico Maria Giordano » Tue May 02, 2006 12:10 pm

Try oBrw:SetSize() method.

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

Postby pawelu » Wed May 03, 2006 6:02 am

Enrico,

Effect still this same ... message not found.

Pawel
pawelu
 
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland

Postby Enrico Maria Giordano » Wed May 03, 2006 6:31 am

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

Antonio?

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


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 7 guests

cron