listbox questions..

How can I get my list box to show the last part of its list rather than the top part of its list?
i.e. the list is too large for the display but I want to see the bottom elements not the top elements.
Also I enabled horizontal and vertical scroll bars but the horizontal scroll bar doesn’t seem to appear… Is there something ‘I’ have to do to get it to display?

horizontal scrollbars only appear if the width of the listbox is less than the sum of the values in COLUMNWIDTHS
Use ScrollPostition to programitically control the list position

lb.scrollposition=lb.listcount-x ’ where x is # to display
x might be calculated as lb.height/lb.rowheight

Brian:

you are not the only one to have troubles with horizontal scrollbars. I too have troubles with it on all Xojo version / MtLion & Mavericks.

That is with a 40 columns ListBox and resizing the window to its minimum width (one of many tests I’ve done).

I do not had time to check, but it was working days ago (two weeks ?) before I had license troubles (my update plan goes to 2015…).

I cannot duplicate H-scroll issues… they work fine…

Has NOTHING to do with the window width (unless the window width forces the LB width to change).

If you have a columnwidth defined as “,10,10" then you LB must be less than 20 before a SB appears. (sum of the widths as mentioned above)… if it is 100,10,10,50,70,100 then it must be less than 340… etc.
It has nothing to do with the DATA in the LB… it has everything to do with comparing the LB width to the sum of the columnwidths (and "
” count as ZERO in this calculation)

In my latest testings, I set nothing in ColumnCount nor in ColumnWidths… so this is not because of that.

I got an answer I cannot test right not: change the value of AutoHideScrollbars.

Of course, I tested that well before asking a question in the Forum and before sending a bug report.

At last, and this is also for me, sometimes: even if it works for the reader, the op have a problem else there will be no op.

Brian, BRIAN ?
Did you solve your problem ?

YES IT IS BECAUSE OF THAT
you have to have a columncount that EXCEEDS the widht of the box to show the bars
not sure how many times I have to say this… no width is the same as ZERO

And what about the change of teh AutoHideScrollbars property ?

What about your running OS ?

Have a look at this screen shot:
http://www.sendspace.com/file/8arg52

vs this one (this one works):
http://www.sendspace.com/file/r8rtg9

the op may be right (but he also can skip / forget something).

Sorry, I cannot check now the differences between the two projects.

BTW: the images (the above URLs) are less than 50KB each.

I have three listboxes on my app, each has 1 column, but the text in that one column is wider than the listbox.
Thanks for the tips.

I will repeat myself ONE MORE time… The DATA in the listbox has NOTHING to do with scrollbars (horizontal)… It has everything to do with the SUM OF THE NUMBERS IN “COLUMNWIDTHS”… and if you don’t set it… it is the same as ZERO
and that sum must be GREATER than the width of the box. It is really quite simple…

Do you know a ListBox resize mode who hide (and not resize) the ListBox Columns ?
(when you resize horizontally the parent window ?

In that mode, there is a horizontal scrollbar to allow the ListBox Contents to be seen.

The other mode is to resize horizontally all columns 'till only vertical grids without anything (no data) displayed. (of course, if you have set horizontal and vertical grids…)

So if you have one column then column widths must be less than the width of the control? Why doesn’t that seem unintuitive?

No, if you have one column, the ColumnWidth must be greater than the width of the control if you want a horizontal scrollbar.

Hi all,

there is a problem I cannot understand. I checked one Example:

The project example: “ListBoxExample.xojo_xml_project” does not have an Horizontal ScrollBar even when that property is ON and even when AutoHideScrollbars is OFF.

I repeat:
I loaded the project example named “ListBoxExample.xojo_xml_project”,
In Behavior, I set AutoHideScrollbars to OFF
and many lines below, in Appearance (before Font and Database Binding), I set ScrollbarHorizontal to ON

Run it,
shrink the window (move the mouse from right to left) to nearly no width: no Horizontal Scrollbar !!!

Environment:
OS X 10.8.5
Xojo 2013 Release 3.3

On the other hand: I found a difference in the Inspector pane on the properties apparition order.

I am seeking help (someone) to send me screen shots of the correct order of properties in the ListBox inspector (ListBox selected of course).

To understand what does not works for me, here a list of two different orders (yes):

ListBox Properties order of appearance

New Project [2013-11-17 17:00]

[code] ID
Name Listbox1
Super Listbox
Scope Public

Behavior
	Hierarchical		OFF
	EnableDrag		OFF
	EnableDragReorder	OFF
	RequiresSelection	OFF
	SelectionType		Single
	ColumnResizable		OFF
	AutoHideScrollbars	ON

ControlSet
	MemberOf		None

Position
	Left			 20
	Top			 20
	Width			560
	Height			360

Locking
	Left				YES
	Right			YES
	Top				YES
	Bottom			YES

Focus Control
	TabIndex		0
	TabStop			ON

Appearance
	Visible			ON
	HelpTag			{empty field}
	AutoDeactivate	ON
	Enabled			ON
	Border			ON
	ColumnCount		1
	ColumnWidths		{empty field}
	HasHeading		OFF
	UseFocusRing		ON
	InitialValue		{empty field}
	HeadingIndex		-1 {red}
	ScrollbarHorizontal	OFF
	ScrollbarVertical	ON
	GridHorizontal		Default
	GridVertical		Default
	DefaultRowHeight	-1 {red}

Font
	System		0	Point
	[] Bold    [] Italic    [] Underline

Database Binding
	DataSource		{empty field}
	DataField		{empty field}

[/code]

ListBox Properties order of appearance {Caritas Project started using RealStudio, 2013-01}

[code] ID
Name LB_Souche (also: LB_Liste)
Super Listbox
Scope Public
Behavior
Hierarchical OFF
EnableDrag ON
EnableDragReorder ON
RequiresSelection OFF
SelectionType Multiple
ColumnResizable ON
AutoHideScrollbars ON

Appearance
	Visible			ON
	HelpTag			{empty field}
	AutoDeactivate		ON
	Enabled			ON
	Border			ON
	ColumnCount		1
	ColumnWidths		{empty field}
	HasHeading		ON
	UseFocusRing		ON
	InitialValue		{empty field}
	HeadingIndex		-1 {red}
	ScrollbarHorizontal	ON
	ScrollbarVertical	ON
	GridHorizontal		ThinDotted
	GridVertical		ThinDotted
	DefaultRowHeight	-1 {red}

ControlSet
	MemberOf		None

Position
	Left			 20
	Top			 20
	Width			920
	Height			560

Locking
	Left			YES
	Right			YES
	Top			YES
	Bottom			YES

Focus Control
	TabIndex		0
	TabStop			ON

Font
	System		0	Point
	[] Bold    [] Italic    [] Underline

Database Binding
	DataSource		{empty field}
	DataField		{empty field}

[/code]

TIA

Not sure if this is relevant, but this is a web project, is it not ?

No. Desktop only here.

Not sure too if this is relevant. :slight_smile:

[quote=47087:@Emile Schwarz]No. Desktop only here.

Not sure too if this is relevant. :-)[/quote]

:slight_smile:

I made the comment because the only ListBoxExample project I can find in the lateset of my RS/Xojo kits ( 2013r2 ) is a web project.

I took it from Xojo 3.3; my fault I forgot to tell that / check in older project (but I erased them)…

It is located in Example Projects / Desktop --> Controls.

To Dave:

get an eye there:

http://documentation.xojo.com/index.php/ListBox
Part: Customized Scroll Controls

The (old) image.

That ListBox have the Horizontal ScrollBar AND do not display all columns (we can see a part of a column on the right).
Nota: I do not want a popup menu there, I have the ListBox Horizontal ScrollBar.

On some project (a newly created with XOjo 2013 Release 3.3), all I can get is all columns shrinked horizontally to the windows’ left when I resize the window (from right to left; OK, same as left to right).

I hope things come clear now.

How many times (and how many people) have to tell you the same thing before you will believe them?

per your own post above

Automatic display of horizontal scrollbars occurs when the SUM TOTAL of the numeric values in ColumnWidths EXCEEDS the width of the listbox control. the sum total of the numeric values in your Columwidths is ZERO… It is as simple as that… I said it, Tim said it…

You can check a box to FORCE it to appear…