>Hi,
>I have an proxy control that add outlook bar programmatically to my main form during runtime.
>I have set my outlookbar's anchor property to have relative resize.
>I would like to resize my control in runtime, and still keeping the anchor setting.
>
>I tried :
>
>
>IF NOT THISFORM.lOutlookInit
> THISFORM.AddObject("OutlookBar", "Outlookbar")
> THISFORM.OutlookBar.Height = THISFORM.Height
> THISFORM.lOutlookInit = .T.
>ENDIF
>
>
>The outlookbar resize accordingly. However, when I resize my form the outlookbar's height will back to "original" before I change it programmatically. What should I do so that VFP respect the outlookbar.height?
>
>Thank you
Set the Anchor AFTER you resize the control:
IF NOT THISFORM.lOutlookInit
THISFORM.AddObject("OutlookBar", "Outlookbar")
THISFORM.OutlookBar.Anchor = 0
THISFORM.OutlookBar.Height = THISFORM.Height
THISFORM.OutlookBar.Anchor = xxxxx
THISFORM.lOutlookInit = .T.
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.