How many characters can be placed in a ListIconGadget Column

Just starting out? Need help? Post your questions and find answers here.
nigel
User
User
Posts: 62
Joined: Tue Feb 23, 2010 8:39 pm
Location: Canada

How many characters can be placed in a ListIconGadget Column

Post by nigel »

I had placed 500 characters in a ListIconGadget column but only the first 259 are displayed.

As no column size limits (width or contents) are mentioned in the documentation (at least I couldn't find any), I am curious to know if this is a bug or if there are undocumented limits involved.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: How many characters can be placed in a ListIconGadget Co

Post by Shield »

It's set to the value of #MAX_PATH (which is 260), so the string gets cut off after 259.
That behavior is not a PureBasic but a Windows API limitation since the gadget is designed
to display general purpose information (such as paths) and not huge texts. :)

Note that (IIRC) the gadget does only display 259 characters but the original text is still stored in memory,
so it should be returned correctly by GetGadgetText.

But it still might be possible to increase the number of characters.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: How many characters can be placed in a ListIconGadget Co

Post by em_uk »

Is that still a limitation on Win7x64?

I know that XP Explorer will fail to open paths longer than 255 chars, but this doesn't affect Win7x64.
----

R Tape loading error, 0:1
nigel
User
User
Posts: 62
Joined: Tue Feb 23, 2010 8:39 pm
Location: Canada

Re: How many characters can be placed in a ListIconGadget Co

Post by nigel »

Thanks for the explanation Shield. I'll just have to live with this one as the alternative of splitting the data over two columns would be somewhat untidy.
Post Reply