Home All Groups Group Topic Archive Search About

How to get checkedlistbox to display horizontal

Author
11 Jul 2006 9:47 PM
BostonNole
Does anyone know how to get the checkedlistbox to display items
horizontally on a windows form?

It seems that it only displays its check box items vertically (up and
down), which is not what I want.

I want to be able to use the CheckedListBox to display the days of the
week going across (horizontally) a windows form.

Thanks.

Author
11 Jul 2006 11:54 PM
Jared Parsons [MSFT]
Hello BostonNole,

> Does anyone know how to get the checkedlistbox to display items
> horizontally on a windows form?
>
> It seems that it only displays its check box items vertically (up and
> down), which is not what I want.
>
> I want to be able to use the CheckedListBox to display the days of the
> week going across (horizontally) a windows form.

I'm pretty sure that CheckedListBox doesn't support that.

If you're mainly looking for the UI affect, you could have a FlowLayoutPanel
and add a series of CheckBox's to it; one for each day of the week.  It takes
away the nicety of the CheckedListBox but it should have the UI you're looking
for.

--
Jared Parsons [MSFT]
jared***@online.microsoft.com
All opinions are my own. All content is provided "AS IS" with no warranties,
and confers no rights.
Author
12 Jul 2006 9:28 AM
Herfried K. Wagner [MVP]
"BostonNole" <bostonn***@gmail.com> schrieb:
> Does anyone know how to get the checkedlistbox to display items
> horizontally on a windows form?
>
> It seems that it only displays its check box items vertically (up and
> down), which is not what I want.

Set the control's 'MultiColumn' property to 'True' and adjust the height of
the control to show only a single item in vertical direction.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Jul 2006 3:28 PM
BostonNole
That did the trick, thank you very much.  I knew it had to be something
simple like that.


Herfried K. Wagner [MVP] wrote:
Show quoteHide quote
> "BostonNole" <bostonn***@gmail.com> schrieb:
> > Does anyone know how to get the checkedlistbox to display items
> > horizontally on a windows form?
> >
> > It seems that it only displays its check box items vertically (up and
> > down), which is not what I want.
>
> Set the control's 'MultiColumn' property to 'True' and adjust the height of
> the control to show only a single item in vertical direction.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>