.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PaletteSet changed control size and layout

7 REPLIES 7
Reply
Message 1 of 8
zhanglinjie
1248 Views, 7 Replies

PaletteSet changed control size and layout

The PaletteSet changed control size and layout. It's different from the status in VS.

What's the reason? PLS help!未命名.jpg

7 REPLIES 7
Message 2 of 8
Irvin
in reply to: zhanglinjie

Hi there,

 

Sorry for this perhaps stupid question, but have you tried anchoring you controls???

If so the pallatsize depending on the achors you used on your control could cause this strecthing behavior.

 

Hope this could help you to solve your problem.

 

Kind regards,

 

Irvin

Message 3 of 8
zhanglinjie
in reply to: Irvin

 achors can't solve this problem.

Message 4 of 8
yaqiz
in reply to: zhanglinjie

I got the same problem.

 

Any ideas?

Message 5 of 8
Alfred.NESWADBA
in reply to: yaqiz

Hi,

 

look to this image, I did  create one usercontrol, placed instances of it to two palettesets ... the difference I set seems to give you a chance to solve your problem:

left part:   pPaletteUI1.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
right part: pPaletteUI2.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 8
yaqiz
in reply to: Alfred.NESWADBA

Thanks Alfred,

 

I didn't see autoscalemode property under paletteset. could you be more details?

 

Thanks again

Message 7 of 8
Alfred.NESWADBA
in reply to: yaqiz

Hi,

 

>> I didn't see autoscalemode property under paletteset. could you be more details?

No, it's not a property of the paletteset. It is a property of your usercontrol (that you instanciated and placed inside the paletteset)

You can do that by setting the property in the code or you open your usercontrol in VisualStudio and set the property in the VS-PropertyWindow.

 

 

The background of that seems to be in the standard-font you use for the usercontrol (and the fonts of the controls inside the usercontrol are - by default - inherited from that). During you see the usercontrol in you VisualStudio-Formseditor the font is depending from your default-settings. But when loaded into AutoCAD (within a paletteset) the fonts seems to be changed ==> and as long as the AutoScaleMode is set to font-depended all will get resized to the new font-properties.

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 8 of 8
yaqiz
in reply to: Alfred.NESWADBA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost