Xojo Conferences
XDCMay2019MiamiUSA

Re: Listbox content not aligned / sorted properly (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: getting administrator privileges with applescript
Next thread: RE: Platform Question to All


Re: Listbox content not aligned / sorted properly   -   lveillette
   Re: Listbox content not aligned / sorted properly   -   Aaron Andrew Hunt
  Listbox content not aligned / sorted properly   -   lveillette
   Re: Listbox content not aligned / sorted properly   -   Greg O'Lone
   Re: Listbox content not aligned / sorted properly   -   Tim Jones

Re: Listbox content not aligned / sorted properly
Date: 02.08.11 04:46 (Mon, 01 Aug 2011 23:46:09 -0400)
From: lveillette
>> I have two listboxes that compare the content of two folders.
>>
>> Sometimes, for a reason that I can't figure out:
>>
>> - added folders are aligned as if they were subfolders, even though they've
>> been added to the root,
>
> If you can duplicate that in a smaller project, I'll gladly sign on as I've
> seen it from time to time, but can't pin it down.
I've tried duplicating it in a smaller project, but it works fine. The bug
must be related to the cells content somehow...

>> - I add a ".." row at the top of my lists, so that people can go back to the
>> parent when they click it. But when I sort that column, the .. rows will
>> sometimes be ordered after names beginning by a space, sometimes they will be
>> ordrered before,
>>
>> In those two cases, I tried defining the encoding to utf8, just to make sures
>> that all strings are equal on both sides. But the problem persists.
> I don't believe this is an encoding issue. Since the "..." is just a marker
> name, what if you use something like SPACE SPACE ... SPACE SPACE?
Haven't tried, but space by itself, should even be sorted before two spaces,
logically.

>> Also, I naively thought that I could make alternate background rows, by
>> setting the graphics color of cells and then filliing it, in the
>> backgroundPaint event.
>>
>> But in a hierarchical listbox, the directories expand/contract arrows are
>> drawn on top of a bigger white rectangle. This looks terrible, how can I fix
>> this?
> Are you setting Composite to true for the parent window? That usually gets it
> for me (in Carbon builds).
You're right. It works here too. Danke!

Louis


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Listbox content not aligned / sorted properly
Date: 02.08.11 00:26 (Mon, 1 Aug 2011 19:26:21 -0400)
From: Aaron Andrew Hunt
> Also, I naively thought that I could make alternate background rows, by
> setting the graphics color of cells and then filliing it, in the
> backgroundPaint event.
> But in a hierarchical listbox, the directories expand/contract arrows are
> drawn on top of a bigger white rectangle. This looks terrible, how can I fix
> this?

Did you remember to return True in your ListBox.CellBackgroundPaint event?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Listbox content not aligned / sorted properly
Date: 01.08.11 19:45 (Mon, 01 Aug 2011 14:45:46 -0400)
From: lveillette
I have two listboxes that compare the content of two folders.

Sometimes, for a reason that I can't figure out:

- added folders are aligned as if they were subfolders, even though they've
been added to the root,

- I add a ".." row at the top of my lists, so that people can go back to the
parent when they click it. But when I sort that column, the .. rows will
sometimes be ordered after names beginning by a space, sometimes they will
be ordrered before,

In those two cases, I tried defining the encoding to utf8, just to make
sures that all strings are equal on both sides. But the problem persists.

Also, I naively thought that I could make alternate background rows, by
setting the graphics color of cells and then filliing it, in the
backgroundPaint event.

But in a hierarchical listbox, the directories expand/contract arrows are
drawn on top of a bigger white rectangle. This looks terrible, how can I fix
this?

Louis


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Listbox content not aligned / sorted properly
Date: 04.08.11 02:21 (Wed, 3 Aug 2011 21:21:36 -0400)
From: Greg O'Lone


Greg O'Lone
Software Engineer
Real Software, Inc.
Real World 2012, THE Real Studio Event of the year!

On Aug 1, 2011, at 2:45 PM, lveillette wrote:

> I have two listboxes that compare the content of two folders.
>
> Sometimes, for a reason that I can't figure out:
>
> - added folders are aligned as if they were subfolders, even though they've
> been added to the root,

Please file a bug report with a project that shows this

> - I add a ".." row at the top of my lists, so that people can go back to the
> parent when they click it. But when I sort that column, the .. rows will
> sometimes be ordered after names beginning by a space, sometimes they will
> be ordrered before,

You can do this using the CompareRows(). Just make sure that your ".." row is always less than the other rows

> Also, I naively thought that I could make alternate background rows, by
> setting the graphics color of cells and then filliing it, in the
> backgroundPaint event.

In the CellBackgroundPaint, use the following code:

if row mod 2 = 0 then
g.forecolor = &cEEEEFF
g.fillrect 0,0,g.width,g.height
end if

> But in a hierarchical listbox, the directories expand/contract arrows are
> drawn on top of a bigger white rectangle. This looks terrible, how can I fix
> this?

If you're running your app on Mac OS X, you'll need to either use a composite window or build as Cocoa to get rid of this.

Greg O'Lone
Software Engineer
Real Software, Inc.
Real World 2012, THE Real Studio Event of the year!

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Listbox content not aligned / sorted properly
Date: 01.08.11 19:57 (Mon, 1 Aug 2011 11:57:09 -0700)
From: Tim Jones
On Aug 1, 2011, at 11:45 AM, lveillette wrote:

> I have two listboxes that compare the content of two folders.
>
> Sometimes, for a reason that I can't figure out:
>
> - added folders are aligned as if they were subfolders, even though they've been added to the root,

If you can duplicate that in a smaller project, I'll gladly sign on as I've seen it from time to time, but can't pin it down.

> - I add a ".." row at the top of my lists, so that people can go back to the parent when they click it. But when I sort that column, the .. rows will sometimes be ordered after names beginning by a space, sometimes they will be ordrered before,
>
> In those two cases, I tried defining the encoding to utf8, just to make sures that all strings are equal on both sides. But the problem persists.

I don't believe this is an encoding issue. Since the "..." is just a marker name, what if you use something like SPACE SPACE ... SPACE SPACE?

> Also, I naively thought that I could make alternate background rows, by setting the graphics color of cells and then filliing it, in the
> backgroundPaint event.
>
> But in a hierarchical listbox, the directories expand/contract arrows are drawn on top of a bigger white rectangle. This looks terrible, how can I fix
> this?

Are you setting Composite to true for the parent window? That usually gets it for me (in Carbon builds).

Tim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>