I already told you about the wong X display location of Pictures in a ListBox Row. I managed to add white pixels on the left of my Icons and for that project, this looks good (I still have to make testings on Windows).
Now I come with two different “features” of the ListBox: The description below have been done on a MacBook Pro 13" 2014-11 / OS X 10.10.3 PB3. You mileage may vary on other OS version and on Linux / Windows or on your OS running VirtualBox
Doh ! I just get a question: what is the default resolution (in dpi) an image have when displayed by ListBox.RowPicture ?
(Linux, OS X, Windows)
1. The RowPicture misnamed function
When I - as a non English mother language guy, read that RowPicture word, I am misleaded.
The correct name (IMHO) have to be CellPicture:
ListBox1.CellPicture(0)=DaveImage
Maybe Xojo can modify that in the future new Xojo ?
2. ListBox.ColumnAlignment: AlignCenter
No, do not think you will be able to align (center) the Icons in Column(0): this does not works.
I set
ListBox1.ColumnAlignment = ListBox.AlignCenter
and run the project to see failing that property.
At last, by deduction (and I recalled that / fortunately, I wanted it there), the Picture cannot be set elsewhere: it is always drawn in Column(0).
BTW: no, I do not want to draw my icons in a Paint event (CellTextPaint or CellBackgroundPaint).
3. ColumnAlignmentOffset(ColNbr)
I just tested that on Column(0), see both lines below -tested one at a time, and that works fine for the test, but does not works for the added Pictures
Weird.
LB.ColumnAlignmentOffset(0) = -10
LB.ColumnAlignmentOffset(0) = 10
4. Personal considerations
After seeing during all these years the quantity of questions in both forums about the use of the ListBox Control, I really think that a manual talking correctly of the ListBox Control have to be provided. In fact, a whole PDF HAVE to be provided; a title can be Book 5: Using the ListBox, with a subtitle that can be: The ListBox Control: using it to displayng a text file, a csv file to using a DataBase Display.
Now, if Xojo only sells a skeleton environment (to build application) and let its users to buy Add-ons, Plugins and all sorts of custom controls (plus MacOSLibs / Windows Functionality Suite, etc.), just tell that ! So everyone will know (before buying a $2,000 license) what to await from Xojo, the XPlatform development Environment.
My current license ends on the next Monday. I will do what I promised two years ago, some days after that renewal.