Antonio
I am quite interested in this thread myself .. The only way I have found to resize the controls is to calculate each one
individually... and when you have folders, it compounds the number of controls you have to calculate.
I searched the samples folder for 'resize16' and found TestFldm.prg. I compiled the program and ran it but could not make any sense of the 'resize16' clause.
Rick Lipkin
- Code: Select all Expand view
ACTIVATE WINDOW oWndChild ;
ON INIT ( oDlg:Move( 0,0, oWndchild:nWidth, oWndchild:nHeight, .T. ),oLbx:SetFocus(), ;
oWndChild:bResized := {|| _ReSizeUm( oDlg,oWndChild,oLbx) }, ;
oDlg:refresh(.t.),oLbx:SetFocus());
VALID ( IIF( !lOK, ExitPgm(.T., oRsFreq,oWndChild,@lOk ), .F. ))
RETURN( .T. )
//------------------------------
Static Func _ReSizeUm( oDlg,oWndChild,oLbx )
oDlg:SetSize( oWndChild:nWidth, oWndChild:nHeight, .t. ) // frame and dialog link
// dialog controls
oDlg:bResized = { | nSizeType, nWidth, nHeight | ResizeControls( nSizeType, nWidth, nHeight, oDlg ) }
Return(nil)
//-------------------------
Static Func ResizeControls( nSizeType, nWidth, nHeight, oDlg )
*xBrowse(oDlg:aControls)
if nSizeType = 0 //SIZE_MAXIMIZED
// 100 100
oDlg:aControls[ 1 ]:SetSize( nWidth - 140, nHeight - 68 ) //txbrowse
endif
Return(nil)