Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resize control programmatically
Message
 
To
10/09/2006 09:51:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01152640
Message ID:
01152961
Views:
24
>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 :
>
>
**FORM.ACTIVATE()
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform