Laden...

How to make a resizable Control?

Erstellt von yngwie vor 18 Jahren Letzter Beitrag vor 18 Jahren 1.750 Views
Y
yngwie Themenstarter:in
238 Beiträge seit 2005
vor 18 Jahren
How to make a resizable Control?

Hello dear community,
Does anybody know whether it is possible to create an interactively resizable Control (e.g. a Panel) by setting some of its Style or ExStyle bits? Similar to the Form Control which is even moveable. Actually when I drag some Control onto Designer it becomes resizable with a rubberband around and with resize handles… Maybe there are any other ways to achieve this aim?
Thank you for any helpful advice.

M
456 Beiträge seit 2004
vor 18 Jahren

As far as I know it's not possible to create an resizable control by setting up some control styles.

I've found an codeguru article about this topic:
http://www.codeguru.com/Cpp/controls/controls/resizing/article.php/c5323/
(But it's MFC and C++, so you have to convert it)

You can have a look at the latest Sharpdevelop source code. They provide a nice Form Editor where you can resize buttons, pannels, textboxes, ...
Here you can get the latest sources:
http://build.sharpdevelop.net/BuildArtefacts/

I am Jack's smirking revenge.
I am Jack's raging bile duct.
I am Jack's cold sweat.
I am Jack's complete lack of surprise.
I am Jack's broken heart.
I am Jack's wasted life.

Y
yngwie Themenstarter:in
238 Beiträge seit 2005
vor 18 Jahren

Answering to my own question:

   protected override CreateParams CreateParams  
    {  
        get  
        {  
            CreateParams param1 = base.CreateParams;  
            param1.Style |= 0x40000;  

            return param1;  
        }  
    }  

that's all 🙂

49.485 Beiträge seit 2005
vor 18 Jahren

Hallo yngwie,

irgendwie ist scheint mein Universalübersetzer kaputt zu sein und mein Babelfish scheint auch zu streiken. Ich sehe plötzlich englischen Originaltext und nicht - wie gewohnt - die deutsche Übersetzung 🙂

herbivore

Y
yngwie Themenstarter:in
238 Beiträge seit 2005
vor 18 Jahren

Hi,
diese Frage habe ich ursprünglich auf einem englischsprachigen Forum verfasst (wo mir übrigens nicht geholfen werden konnte) und wollte nicht unbedingt alles neu auf deutsch schreiben müssen🙂 Genauso auch die Antwort.

M
456 Beiträge seit 2004
vor 18 Jahren

Und ich dachte schon, dass sich jetzt hier die ersten englischsprachigen Leute verirrt haben 😉

I am Jack's smirking revenge.
I am Jack's raging bile duct.
I am Jack's cold sweat.
I am Jack's complete lack of surprise.
I am Jack's broken heart.
I am Jack's wasted life.