Have you checked the bug database? Sounds like a problem I reported a few years 
back - are you running at 120 dpi by any chance?
  Andrew

-----Original Message-----
From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf 
Of Stanislav Petko
Sent: Wednesday, May 21, 2008 10:17 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [Spam:***** SpamScore] [ADVANCED-DOTNET] Wrong beahavior of anchored 
controls on UserControl on localizable form

Hello everyone

We have created our own UserControl called MiniInfo. It contains GroupBox, 
which is docked to fill whole usercontrol. MiniInfo serves as "panel", so when 
placed on form, another controls can be placed on it, but actually, these 
controls are added on mentioned GroupBox - we have own designer 
(ParentControlDesigner) for MiniInfo to achieve this. Everything is OK, except 
one thing.

When MiniInfo is placed on forme, some controls on it are anchored on both 
sides. Ofcourse, size of MiniInfo is changed to our needs. If form's 
localization is turned off (property Localization = False), MiniInfo's child 
controls are stretched properly.

But if we turn on Localization (what we need to do), after rebuilding project, 
the sizes of anchored controls are changed - the controls are smaller, or 
bigger. This change depends on if MiniInfo was set smaller or bigger against 
it's original size (when placed on form). And this size change is beyond the 
change caused by anchoring.

Example: I put MiniInfo on form, make it wider, put textbox on it, resize the 
textbox so it is form side to side of MiniInfo and anchor it on left and right 
side. After rebuilding the project and reloading the form (close and open it), 
the size of textbox is not from side to side of MiniInfo, but is wider, so it 
sticks out beyond the right side of MiniInfo.

This happens only, if form is localizable.


The only workaround we know about is, when MiniInfo is placed on form, we put 
another panel on it a we dock it to fill MiniInfo. Other controls are put onto 
this panel and everything is OK.


Does anybody know what could be a problem?



Thanks for any help, Stano

===================================
This list is hosted by DevelopMentor  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


-- 
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 11894546) is spam:
Spam:        http://mail-gw.cognex.com/canit/b.php?c=s&i=11894546&m=4fbb52425ac2
Not spam:    http://mail-gw.cognex.com/canit/b.php?c=n&i=11894546&m=4fbb52425ac2
Forget vote: http://mail-gw.cognex.com/canit/b.php?c=f&i=11894546&m=4fbb52425ac2
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS

Reply via email to