2013-01 Project: ListBox ScrollBarHorizontal is not displayed

How do I display the Horizontal ScrollBar in Xojo ?

Environment:
Xojo 2013 Release 3.3
OS X Mt Lion 10.8.5

Project properties:

Name: Working in the IDE with sqlite.rbp Size: 5,4 Mo (5 420 064 Octets) Created: vendredi 8 mars 2013 08:13:55 Modified: mercredi 13 novembre 2013 16:10:59

ListBox Properties (selection):

AutoHideScrollBar OFF (* was ON) ScrollBarHorizontal ON (* was OFF) ScrollBarVertical ON ColumnCount 1 (* Was 4) ColumnWidths Empty (* was something else, now lost **)

I’ve made a report in Change into a special TextField:

If Me.ScrollBarHorizontal = True Then TF_Contextual.Text = "Me.ScrollBarHorizontal = True" Else TF_Contextual.Text = "Me.ScrollBarHorizontal = False" End If

  • Value set by Real Studio, saved before Xojo was released.
    ** Real value:
    *, 200, *, 100, 100, 100, 10, 10, 10, 10, 10, 10, 10

I get these values using:
TF_Contextual.Text = Me.ColumnWidths
in the ListBox Change event (OK, I found why: I set that in code too). But commenting the line does not change anything !

I even tried to set another ListBox and so changed this one’s name and add another with the right name: I got an error telling me that the ListBox is missing.

I saved the project as xml text, searched in it and get (only one ListBox in that project):

<PropertyVal Name="AutoHideScrollbars">False</PropertyVal> <PropertyVal Name="ScrollBarVertical">True</PropertyVal> <PropertyVal Name="ScrollbarHorizontal">True</PropertyVal>

What can I do ?

Emile

PS: I’ve made a manual backup of my MacBook Pro internal hard disk, format it, install Mountain Lion (too many troubles with Mavericks), the 10.8.5 update, etc. ONE WEEK AND A HALF AGO.

My boot time called from 3 to 5 minutes to 50 seconds, no latency before I am able to launch an application.

A night gone, a morning comes.

In that same project, I added a brand new window, a Listbox (who the b is not capitalized now ?) and put this code in the just added Window Open event:

[code]Dim i As Integer

Listbox1.ColumnCount = 20

For i = 0 To 100
Listbox1.AddRow “A”
Listbox1.Cell(i,1) = “B”
Listbox1.Cell(i,2) = “C”
Listbox1.Cell(i,3) = “D”
Listbox1.Cell(i,4) = “E”
Listbox1.Cell(i,5) = “F”
Listbox1.Cell(i,6) = “G”
Listbox1.Cell(i,7) = “H”
Listbox1.Cell(i,8) = “I”
Listbox1.Cell(i,9) = “I”

Listbox1.Cell(i,10) = "J"
Listbox1.Cell(i,11) = "K"
Listbox1.Cell(i,12) = "L"
Listbox1.Cell(i,13) = "M"
Listbox1.Cell(i,14) = "N"
Listbox1.Cell(i,15) = "O"
Listbox1.Cell(i,16) = "P"
Listbox1.Cell(i,17) = "Q"
Listbox1.Cell(i,18) = "R"
Listbox1.Cell(i,19) = "S"

Listbox1.Cell(i,20) = "J"
Listbox1.Cell(i,21) = "K"
Listbox1.Cell(i,22) = "L"
Listbox1.Cell(i,23) = "M"
Listbox1.Cell(i,24) = "N"
Listbox1.Cell(i,25) = "O"
Listbox1.Cell(i,26) = "P"
Listbox1.Cell(i,27) = "Q"
Listbox1.Cell(i,28) = "R"
Listbox1.Cell(i,29) = "S"

Listbox1.Cell(i,30) = "T"
Listbox1.Cell(i,31) = "U"
Listbox1.Cell(i,32) = "V"
Listbox1.Cell(i,33) = "W"
Listbox1.Cell(i,34) = "X"
Listbox1.Cell(i,35) = "Y"
Listbox1.Cell(i,36) = "Z"
Listbox1.Cell(i,37) = "a"
Listbox1.Cell(i,38) = "b"
Listbox1.Cell(i,39) = "c"

Next[/code]

Enlarging the window does not let me see columns past “S” even with a near 3K width larger display !
Oh, still no horizontal scrollbar !

Brand new project created with Xojo 2013 Release 3.3 with above code (last):

AutoHideScrollBars is OFF
Only 20 Columns (0 to 19 in the Headings as I ask) BUT NO HorizontalScrollBar !

So, is this a Bug ?

I slapped a listbox into a project… set the # of columns to 20, pasted your column width in
and a horizontal scrollbar DOES appear… BUT ONLY IF the width of the list box is LESS that the sum of NUMBERS in the column width designator. The * say use “whatever” is left… the sum of your column width is 570

HS appears at 571 and below… but not above… which if you think about makes perfect sense.

So either make you LB 570 or less… or replace one or both of those “*” with hard numbers

I create a new project with Xojo 2013 Release 1 / Mavericks and get the same results: no Horizontal scrollbar.

I set the number of Columns to far more or 20 (40 ?), reduce the window size to the minimum (only vertical grid cor columns appears and no Horizontal scrollbar.

I will write a bug report with that so simple project, a screen shot and the compiled application.

BTW: I do not set the # of column at design mode, but at Window1.Open time.

The sum of the column widths must be greater than the width of the listbox for the horizontal scrollbar to appear. All column widths must be set with hard numbers. not %, or *, etc.

Which is exactly what I had said… and not ALL have to be hard #'s the LB just needs to be smaller than the sum of the numbers provided. In the OP case the hard numbers added up to 570 with two “*”

Unfortunately, this goes the same with no width set, large numbers of Columns, window width at its minimum (no displayed text)…

I have tested everything I could (All Xojo versions / Mt Lion & Mavericks).

I even created from scratch (no previous project nor previous code was used), dynamically set the number of columns from what I load from a RAW TEXT file, resize the window to smaller than the total text width. At last it may be a license issue (since I got troubles with it even if my update plan goes into 2015).

I am out of ideas on the subject.

Strange. Did you say Strange ?

I found a project where I set an HorizontalScrollBar (to the ListBox and there it works fine (when I resize the window width to the left and the columns stays with their width (so the columns at the right disappears) instead of a width shrink.

I do not understand.

No column widths is the same as saying “,,,” and as mentioned in the other thread about this same topic… it is based on the sum of the columnwidths where “*” counts as ZERO… The DATA in the LB does NOT control the columnwidths in regards to the scrollbars.

More info to understand is available in the two small images:
This does not works:
http://www.sendspace.com/file/8arg52

This one works:
http://www.sendspace.com/file/r8rtg9

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

I am done… you seem to refuse to listen to the information provided… I am guessing you want it to work your way… not the way it has been described as required… good luck…

Dave: take a look at the images; that is what I found on two different projects.

I do not refuse anything at all, it is what I have.

Read back tomorrow or so for the final words on the subject (I hope).

I am not going to enroll in some service to view your images… and yeah that is EXACTLY what those links asks me to do…

SendFiles do not ask that (I think)): I initialized (low level) my hard disk 10 days ago, I do not import data from the old HD, and this is the first time that I use SendFiles.
Sorry for the enroll questions: I do not like that too (I really dislike that). My MediaFire account is not available (I have to get my hands on the name / password to re-activate it).
However, I can send them to you in a mail if this helps.

Basically, we can see a ListBox who have 8 columns, 1 and a half on screen AND an Horizontal ScrollBar on one screen shot and on the other, all columns appears in the screen shot with nearly no text and no Horizontal ScrollBar.

Clearly, there is a difference that I have to find between these two projects (of mine).

At last, youc an get more info and a project in that ‘bug report’:

30801
30801 - ListBox.ScrollBarHorizontal does not appears on Xojo (all versions)

Hi,

I had time to compare a project with an Horizontal Scrollbar and another who do not display it.

In the IDE, Inspector pane (in the OS X MDI window):

The order of appearance of the properties is different.

Project with Horizontal Scrollbar Project WITHOUT ID ID Behavior Behavior Appearance Control Set .../... Position Locking .../...

Of course, every properties are present, but not in the correct order. How can this be possible is beyond my understanding (and responsibilities).

I will add some screen shots in the Bug report lately.

Interesting. A few weeks ago, I had the experience of two listboxes having different property orders in the inspector as well. And one of them behaved differently than the other. As I recall, they were both hierarchical; I could drag a row from one, but not the other, despite all properties being set the same.

I never did get to the bottom of it. I solved the problem by deleting the incorrectly-behaving control, and placing a new listbox on the window, which then showed its properties in the correct order, and behaved correctly.

It would be interesting to save the project in text format (if it isn’t already), and compare the two instances in a text editor…

Not at all surprising. The order and presence of the properties is set at the time the control is placed on the window. If the inspector behavior is then changed and another instance of the control is placed on the window, they will have a different list in the inspector. Note that it is very likely that the inspector behavior changed in 2013, so if you have an older project and you place another control on it, the new control will have a different list than the others.

Are you sure of this, Tim, or is it a presumption? If it is the case, then I would argue that it’s a bug, or at least a poorly designed behavior.

If the layout of properties in the inspector changes in some version f the IDE for a particular object type, I would expect any older instances to be modified to conform she the project is saved by the new version of Xojo.

Anyway, in the case I mentioned, I recall looking at the files for the window, and finding that both listbox descriptions seemed to be listed in the same order, and with the same properties. Unfortunately, I no longer have easy access to those files, so I can’t check that.

hierarchical
Not here, my single ListBox in that window is flat.

drag rows
Is set to true (draw a row in that ListBox - modify the appearance order).

I also set the Row to allow Column Resize.

Another thing arise with ListBox.
The Control name is now Listbox (vs ListBox): CASE CHANGE for the ‘b’. All manuals (PDF) use ListBox except one who use Listbox.

Also: Usually, I never go back to an older IDE version after some days / weeks. In these cases, I do not do that / one was created with Real Studio around Jau-nuary 20, 2013, the others were created with Xojo 3.3 for the latest to check that scrollbar problem.

I exported to xml the 3.3 created test project and double-click on it to get the same (bad) behavior.

The Real Studio project compiled (or simply run) displays the horizontal scrollbar (when appropriate), but do not have AutoScrollBar ON (Yes it have that property OFF).

Changing the status of that property (AutoScrollBar) fro ON to OFF and back leads to no change. I even saw a case (Windows XP) when the property reverted by itself to OFF at compile time. I saved the project, set it to ON, run and saw the property back to OFF by itself while the IDE was showing the compile window/wait stuff. No Horizontal scrollbar available.

On the other hand, the IDE is displayed things in a wrong order. BUT it is strong enought to not crash / not displaying strange things in the Inspector pane.

Talking to xml save as:
Save the changes to your project before Save as your project, else you loose the changes in the previous file format.