Page 1 of 1

oBrw:SetSize() has no effect at all in TXBROWSE..please help

Posted: Tue May 02, 2006 8:32 pm
by Ehab Samir Aziz
That statement oBrw:SetSize( 20, 20 ) Antonio suggested to resize the dialog box has no effect at all on resizing the dialog . You can test it your self .

Code: Select all


STATIC FUNCTION mete( oWnd )
*-----------------------------------------------
   local oChild, oBrw
   Local oDlgn, oDbfc, oBrwc
   local nRecNo  := RecNo()
   local new_rec  := 0
   local oGet
   local i:=0
   local oCombo1:= Space( 10 )
   local oCombo2:= Space( 8 )
   local oCombo3:= Space( 6 )
   local oCombo4:= Space( 20 ) 
   local oCombo5:= Space( 8 )
   local V_MC_serial:= Space( 7 )

   local nFor
   local bFilter := ""
   local cFilter := ""
   local x := ""
*local nWidth:=120
*local nHeight:=40

REQUEST ADS 
rddRegister( "ADS", 1 ) 
rddsetdefault( "ADS" ) 
AdsSetDeleted(.T.) 
SET SERVER LOCAL 
SET FILETYPE TO CDX 

 


x := "'9855564'" 
cFilter := "me_mc_serl = "+ x 
bFilter = "{||"+cFilter+"}"


SELECT 4
use mete index mete2
GO TOP


DEFINE DIALOG oDlgn  FROM 1,1 TO 30,120 TITLE "Dialog Meter Works" 

 

   oBrw := TXBrowse():New( oDlgn )
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLCELL
   oBrw:nColDividerStyle    := LINESTYLE_BLACK
   oBrw:nRowDividerStyle    := LINESTYLE_BLACK
   oBrw:lColDividerComplete := .t. 
   oBrw:nHeaderLines        := 1
   oBrw:nFooterLines        := 1
   oBrw:nDataLines          := 1
   oBrw:lFooter             := .t.
   oBrw:SetRDD()
   oBrw:SetSize( 20, 20 )


   for nFor := 1 to Fcount()
   if nFor=20
      oBrw:aCols[ nFor ]:cHeader       := FieldName( nFor )
      oBrw:aCols[ nFor ]:cFooter       := alltrim(STR(TOTALEM2(),12,0))
      loop
   endif
      oBrw:aCols[ nFor ]:cHeader       := FieldName( nFor )
      oBrw:aCols[ nFor ]:cFooter       := FieldName( nFor )
   next

 

 

   @ 9, 1 BUTTON "&New"    OF oDlgn SIZE 40, 12 //ACTION Editmach( oLbx, .t. )
   @ 9, 8 BUTTON "&Modify" OF oDlgn SIZE 40, 12  //ACTION Editmach( oLbx, .f. ) 
   @ 9, 15 BUTTON "&Delete" OF oDlgn  SIZE 40, 12  //ACTION Delrecord( oLbx ) 
   @ 9, 22 BUTTON "&Search" OF oDlgn SIZE 40, 12 //ACTION Seekmach( oLbx ) 
   @ 9, 29 BUTTON "&Print"  OF oDlgn ;
      SIZE 40, 12;
      ACTION oBrw:Report( "Machines Report", .t. ) ;  // .t. --> wants preview 


   @ 9, 36 BUTTON "&Exit"   OF oDlgn ACTION oDlgn:End() SIZE 40, 12

   @ 10,  1 BUTTON "&Order"    OF oDlgn SIZE 40, 12 //ACTION ordermach(oLbx) 
   @ 10,  8 BUTTON "&Filter"    OF oDlgn SIZE 40, 12 //ACTION metefilter(oLbx) 
   @ 10,  15 BUTTON "&Unfilter" OF oDlgn SIZE 40, 12 //ACTION filtermachNotOk(oLbx) 

 

   oBrw:SetSize( 20, 20 )
   oBrw:CreateFromCode()


   *oDlgn:oClient := oBrw

 

   ACTIVATE DIALOG oDlgn 

RETURN NIL


Re: oBrw:SetSize() has no effect at all in TXBROWSE..please

Posted: Tue May 02, 2006 8:35 pm
by Enrico Maria Giordano
Try

Code: Select all

ACTIVATE DIALOG oDlgn;
         ON INIToBrw:SetSize( 20, 20 )
EMG

Posted: Fri May 05, 2006 10:46 am
by Ehab Samir Aziz
Thanks EnricoMaria It works