Is there more to determining the pixel size of the text string?  In using
your example, the largest pixel string value was 557, and varied from
224 to 557, yet the text strings being added to the listbox fill the
horizontal width of the box.  It is a formatted content, and tab characters
are used to position each column of data.  The font being used is
Courier New with a pitch of 10 - I suspect that the getTextSizePx is
sizing the string before Tab expansion and assumes the default font for the
dialog, which with tabs and different pitch characters would make quite
a difference.  Thanks for the info, it gave me enough to make this work
through trial and error, but would like a better algorithm on how to be
sure I give it enough width.

> On Fri, Jan 25, 2013 at 7:05 PM, Mark Miesfeld <miesf...@gmail.com>
> wrote:
>
>>
>> You do that with the list box setWidthPx() method.  A typical
>> sequence is something like this:
>>
>>
>> lb = self~newListBox('IDC_LB_CITIES')
>>
>> max = 10
>
>
> This is probably a slightly better approach:
>
>
> lb = self~newListBox('IDC_LB_FILES')
> max = lb~pixelCX
> items = .array~of("New York New York"~copies(9),       -
>
> ...

--
  Art Heimsoth - artst...@artheimsoth.com

------------------------------------------------------------------------------
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/learnnow-d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to