Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Anchors in CFormViews Collapse All
Subject Author Date
Leland Dykes Nov 9, 2006 - 11:53 AM

I’m attempting to apply anchoring within CFormViews using the procedure described in the document on this subject, i.e., using the CExtWA template, and anchoring the controls immediately after creation of the FormView object in its parent window. This works, except that the anchored points are always displaced a number of pixels beyond where they ought to be. Put another way, the internal formatting is good, but I’m losing my right and bottom margins.

A wrinkle: Bringing a different frame window to the frontcauses the form to "refresh" to the correct configuration when it’s returned to the front, unless there happens to be an anchored Grid in it.

Any suggestions would be appreciated, thanks.

Technical Support Nov 9, 2006 - 1:05 PM

The CExtWA template class, which was designed for CExtResizableDialog, is not compatible with scrollable windows like CFormView. Please download a project that demonstrates how to implement a container window (CExtScrollContainerWnd) with a resizable dialog (CExtResizableDialog) inside. If the container window’s size is smaller than the initial size of the dialog window, it is scrolling the dialog. Otherwise, the inner dialog is stretched out to fill the container’s client area and performs anchor-based resizing. So you could simply use this container window instead the form view in any project that is not based on the document/view architecture. But if you do have a document/view project, just use the CView class and create the mentioned container window with inner dialog window inside it.