-
August 29th, 2013, 02:31 AM
#1
user size control of an object
hey all
just wondering what tool I need to use to allow user size control of an object (a gauge).
I just want them to be able to click on the gauge to enter size adjustment mode...
can't figure out which tool to use
thanks for any help
-
August 29th, 2013, 08:18 AM
#2
Re: user size control of an object
-
August 29th, 2013, 06:12 PM
#3
Re: user size control of an object
hey i'm kinda looking for a code snppet or soemthing to use to allow the user to change size of a control at runtime...
I see examples for VB, but VS coding is different isn't it?
-
August 30th, 2013, 02:46 PM
#4
Re: user size control of an object
Originally Posted by s900t8v
hey i'm kinda looking for a code snppet or soemthing to use to allow the user to change size of a control at runtime...
I see examples for VB, but VS coding is different isn't it?
You mean C# coding? VS is Visual Studio which isn't a language.
You can figure this out yourself. Start a new project. Add a Control of your choosing and a button to the form. Add a button handler and when clicked, resize the control. Keep the topleft corner of the control the same and just change the width and/or height. Look in msdn for the control properties to change.
Once you get that working, add a slider to your form, and a change handler to the slider. Now move the code you wrote before in the button handler into the slider handler (using the value passed into the the slider handler to set the width/height).
What you don't want to do is to try to do/learn this in your mega project. Figure it out in a small project, debug it and get it working before transferring the idea to your large project.
-
August 30th, 2013, 02:47 PM
#5
Re: user size control of an object
All that being is said you can dock the controls such that when a user resizes the form, the controls resize as well. That's kind of more common that resizing with a slider.
-
August 30th, 2013, 04:27 PM
#6
Re: user size control of an object
oh yeah good idea Thanks
here is what I have done so far
basically you can swap layouts, swap between night and day mode (havent done day mode gauge color change stuff yet) and then choose the data input to the gauge, all the data inputs work and the gauge style changes to suit the value range for the respective data input, changing from analogue to digital still uses the same gauge system so it was less coding...
I could put all the stuff in a table layout panel then dock the panel to the tab, then when the tab is resized the layout panel and all the gauges are too (this is what is done on other tabs) but pppl complain that on tablets/ devices with small screens they have problems.
the last feature I want to implement is drag size control for users at runtime, and the option to turn the visiblility of individual gauges on/off (easy will do this with checkboxes I think)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|