PDA

View Full Version : .NET selecting and scaling Label in Form


SuperWoko
04-10-2012, 07:42 PM
Hi. Is there any function in .Net Form to select and transform label in it.

for example simple code:


form=dotNetObject "form"
form.show()

label1 = dotnetobject "label"
label1.backColor=(dotNetClass "system.drawing.color").black
label1.bounds=dotNetObject "system.drawing.rectangle" 30 30 40 40
form.controls.add label1

label2 = dotnetobject "label"
label2.backColor=(dotNetClass "system.drawing.color").black
label2.bounds=dotNetObject "system.drawing.rectangle" 130 130 40 40
form.controls.add label2

label3 = dotnetobject "label"
label3.backColor=(dotNetClass "system.drawing.color").black
label3.bounds=dotNetObject "system.drawing.rectangle" 180 180 40 40
form.controls.add label3

After creating this form I would like to select label's one by one or multiple and after that scale them.
So is there any function in .Net to do this for me or should I write my own function's?
I've just started to discover .Net in MXS and I have huge probrem's what can be done with kind of automatic .NET function's in it or what shuld be written by my self.

denisT
04-11-2012, 01:09 AM
where is a problem? scale is a control's method: http://msdn.microsoft.com/en-us/library/aa334893%28v=vs.71%29.aspx
or you are looking for something else

SuperWoko
04-11-2012, 10:22 AM
Thanks for replay. Here is the idea. I want to write custom ui creator like http://lonerobot.net/?p=840 did, but much more simpler. I've started with very simply ui with one button. With it I can create unlimited numbers of label's which can be transformed by position and scale. But my scaling system is just one point based. I have added in every labal another label which controls the width and height of parent.

The lonerobot and others custom UI creators, have ability to select multiple objects in created form or select one by one object and transform it in the FORM. I'm qurius is this a some dotNET funcion or they just wrote it by them selfs.


here is my example what I want to achieve the select and transform tool
http://img171.imageshack.us/img171/2717/dotnet.jpg

another example in 11 - 15 sec
http://www.youtube.com/watch?v=VCwS10xXeMY

CGTalk Moderation
04-11-2012, 10:22 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.