سؤال

I have used CheckedListBox control in vb.net application.

I have several items as follow, item 1, item 2, item 3........item 100.

Now, i want all these items to arrange into three columns and then appear verticle scrollbar.

But, in CheckedListBox, it appears as horizontally. i want it to appear horizontally for just three columns and then vertical scroll should enable.

Can you please suggest if possible in CheckedListBox control or any other control and if possible then how i would have to set its property to achieve this.

هل كانت مفيدة؟

المحلول

I don't think you can do that in a CheckedListBox....

You could create a FlowLayoutPanel, with a fixed width and add AutoScroll = True. Then add a number of CheckBox controls to it.

enter image description here

You could have problems regarding column alignment and margins. If that's the case, you can set the checkbox Autosize = False and make them a little larger (in order to contain the text)

enter image description here

Or you can reduce the Height of the checkboxes to reduce spaces (is this what you want?)

eg. Height = 15

enter image description here

نصائح أخرى

Use repeat direction =horizontal and repeat column =3 for checkbox list

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top