Listbox not showing scrollbar

G

Guest

I tried a listbox in C# visual studio .net 2003. I had 4 items in the list box (numbers 1, 2, 3 and 4
When I run it on the pocket pc 2003 emulator I do not see any scrollbar and I see number 1. What am I doing wrong?
 
M

Maarten Struys, eMVP

When the dimensions of a listbox are large enough (at least 2 lines visible
on the screen) scrollbars are showing. So you're listbox's height is
probably too small to render scrollbars. This is funny, because they do show
up in the designer. I would call this a bug, since the user does not see
that more items are available in the listbox. It is possible scrolling
through the list using the up/down arrow keys, to the listbox itself does
function. I just checked and I see the same behavior on a device. Anyway,
adjust your listbox height and you will get scrollbars.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com

vijay said:
I tried a listbox in C# visual studio .net 2003. I had 4 items in the
list box (numbers 1, 2, 3 and 4)
When I run it on the pocket pc 2003 emulator I do not see any scrollbar
and I see number 1. What am I doing wrong?
 
G

Guest

Thanks Maarten
I had to change the ListBox height to 30 to make the scrollbar show which means I have to show 2 lines. I would say it is a bug! Another problem I see is also that I can only go from listbox height of 15 to 30 , I can not select 24
I would prefer to show only one row with a scrollbar like a drop down listbox. Do you know how? I changed the form grid interval to 4,4. It did not help
Vija

----- Maarten Struys, eMVP wrote: ----

When the dimensions of a listbox are large enough (at least 2 lines visibl
on the screen) scrollbars are showing. So you're listbox's height i
probably too small to render scrollbars. This is funny, because they do sho
up in the designer. I would call this a bug, since the user does not se
that more items are available in the listbox. It is possible scrollin
through the list using the up/down arrow keys, to the listbox itself doe
function. I just checked and I see the same behavior on a device. Anyway
adjust your listbox height and you will get scrollbars

--
Regards

Maarten Struys, eMV
PTS Software b

www.opennetcf.org | www.dotnetfordevices.co

vijay said:
I tried a listbox in C# visual studio .net 2003. I had 4 items in th
list box (numbers 1, 2, 3 and 4
When I run it on the pocket pc 2003 emulator I do not see any scrollba
and I see number 1. What am I doing wrong
 
M

Maarten Struys, eMVP

Actually the height of the ListBox is adjusted such that complete items will
be visible. This is done mainly for scrolling purposes, which means that you
can't select any arbitrary number as height of the ListBox.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com

vijay said:
Thanks Maarten,
I had to change the ListBox height to 30 to make the scrollbar show which
means I have to show 2 lines. I would say it is a bug! Another problem I see
is also that I can only go from listbox height of 15 to 30 , I can not
select 24!
I would prefer to show only one row with a scrollbar like a drop down
listbox. Do you know how? I changed the form grid interval to 4,4. It did
not help!
 
B

Boris Nienke

not select 24! I would prefer to show only one row with a scrollbar like
a drop down listbox. Do you know how? I changed the form grid interval
to 4,4. It did not help! Vijay

Sorry... you like to have ListBox that shows just ONE item at a time?
Then what you need is not a ListBox but
a) a ComboBox (here the user can see one row and can push a button to see
the list)

b) an EditBox or just a Label - combined with an up/down button beneath it.
Then the user can see one item and can "scroll/switch" thru all item by
pushing the up/down arrows. Of course you need to hold the Data off-screen
in an ArrayList or something

Boris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top