Hi,
I have a general question about the checkbox item in Visual Studio. Is it possible to have the check next to the label be dynamic and move depending on if the text is long? I would like to have this option if it's possible because on my app, if the price is longer than the text I set for it, the checkbox and the label will overlap(text right aligned, check center aligned)
Is this possible?
Checkbox and moving the check
Page 1 of 15 Replies - 206 Views - Last Post: 12 October 2012 - 10:25 AM
Replies To: Checkbox and moving the check
#2
Re: Checkbox and moving the check
Posted 12 October 2012 - 08:52 AM
Certainly.. make a user control or a panel.. drop a label in said control.. dock the label to the left. Now drop a checkbox into the control. Set to fill. Now set your user control (or panel)'s height to about what.. 23? Just so it looks like one line. There you go.
#3
Re: Checkbox and moving the check
Posted 12 October 2012 - 09:14 AM
I'm not seeing a fill property, what component would it be with? I can't see it on either the panel,label, or checkbox control
#4
Re: Checkbox and moving the check
Posted 12 October 2012 - 09:23 AM
Look under Dock.
#5
Re: Checkbox and moving the check
Posted 12 October 2012 - 10:22 AM
Using a checkbox to hold a price is interesting, to say the least.
However, have you checked out the AutoSize property?
I think it would be preferable, from a friendly user interface point of view, to allow enough room for the longest label it's likely to have, rather than moving the checkbox button itself.
However, have you checked out the AutoSize property?
I think it would be preferable, from a friendly user interface point of view, to allow enough room for the longest label it's likely to have, rather than moving the checkbox button itself.
#6
Re: Checkbox and moving the check
Posted 12 October 2012 - 10:25 AM
You might also look at putting the checkboxes into a FlowLayoutPanel so that they shift if the text in the previous control takes more room.

When the text of the checkbox changes the control beside it moves

This was done just putting the controls in a formlayoutpanel and changing the text property in code.

When the text of the checkbox changes the control beside it moves

This was done just putting the controls in a formlayoutpanel and changing the text property in code.
This post has been edited by CharlieMay: 12 October 2012 - 10:32 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote








|