On Thu, Jan 10, 2013 at 7:25 AM, Art Heimsoth <artst...@artheimsoth.com>wrote:

>
> It appears that with the font set to fixedsys, as soon as the listbox
> is scrolled, the font being used reverts to something else - maybe
> the default.  Also, I was not using the LBS_USETABSTOPS but when
> I added that, the blobs no longer show for the tab characters, but
> the tabstops also do not appear to be honored.
>
> I am sending the test case to you directly - off list.
>

I already replied to Art off-line.  For the benefit of others that are
reading this and may have a similar problem with list-box, I'll summarize
my conclusions.

1.)  The list-box has to have the LBS_USETABSTOPS style.  This is
the COLUMNS keyword if you are using a UserDialog.  Without this style the
list box does not parse the tab in a string, it is just treated as the
character 0x9 which is a non-printable character.

2.)  In order to actually get columns in the list box, and a consistent
display, you *must* invoke the setTabulators method before you add any
items to the list box.  You must not invoke it more than once.

3.)   Don't think of tabs as you would think of tab stops in a word
processing application.

Rather, for the list-box, think of columns.  The first setting of the
tabulator is the start of the second column, the second setting is the
start of the third column, and so on.  The tab characters in your strings
are used to separate the string into columns.  They are not really tabs
that tab the string to the next tab stop.

I didn't investigate the font problem.  But, from what I learned in looking
at the tab thing, I would guess that a similar thing applies.

1.)  Set the new font before adding any items to the list box.

2.) Only set the font once, you can not switch fonts back and forth.  (Or,
you can, but do not expect good results.)

The list box is intended to be a very simple control.  My guess is that the
operating system formats the strings as they are added to the list box.
 They are all formatted using the current settings of the list box.  If you
change something related to formatting, the list box only re-formats the
visible items at the time of the change, but not the other items.

That last paragraph - I don't know that for a fact.  It is just what it
seems like from observation.

--
Mark Miesfeld
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to