Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Expanding and collapsing all of ListBox (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: [ANN] 3DMF Workshop v0.6d and Quesa Wrappers v0.6.1b (Rb3D extensions)
Next thread: [OT] Google programming contents with $$ to win


Win32 API Declares   -   Berg, Heath
  Expanding and collapsing all of ListBox   -   Stefan Pantke
   Re: Expanding and collapsing all of ListBox   -   Seth Willits
   Re: Expanding and collapsing all of ListBox   -   Stefan Pantke
   Re: Expanding and collapsing all of ListBox   -   Terry Ford
   Re: Expanding and collapsing all of ListBox   -   Seth Willits
   Re: Expanding and collapsing all of ListBox   -   Karen
   Re: Expanding and collapsing all of ListBox   -   Emile Schwarz

Expanding and collapsing all of ListBox
Date: 02.08.05 01:30 (Tue, 2 Aug 2005 02:30:01 +0200)
From: Stefan Pantke
What is the supposed method to expand or collapse
all hierarchical rows of a ListBox?

- Supposed method speaking of UI guidelines?
ALT-Key + Click on triangle?

- I'm in search of a method which allows to collapse()
or expand a row. I know, there is an event, but how
about a method to do this?

Kinds

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Expanding and collapsing all of ListBox
Date: 02.08.05 02:27 (Mon, 1 Aug 2005 18:27:46 -0700)
From: Seth Willits
On Aug 1, 2005, at 5:30 PM, Stefan Pantke wrote:

> What is the supposed method to expand or collapse
> all hierarchical rows of a ListBox?
>
> - Supposed method speaking of UI guidelines?
> ALT-Key + Click on triangle?

I was telling my dad about this the other day.... I *swear* I've used
at least one program that allowed option-clicking on a triangle to
expand/collapse them all, but I can't for the life of me find one
that does it whenever I try. But yes, Option-Clicking is something I
often expect to work and I've actually implemented it in one of my
own (Cocoa, not RB) programs. RB makes this a bit harder, I haven't a
good clear thought on how you'd need to get it to work right now, but
I'm off to the Garden of Olives for dinner...


> - I'm in search of a method which allows to collapse()
> or expand a row. I know, there is an event, but how
> about a method to do this?

List.Expanded(row) = true/false

Start from the top and go down.



Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Expanding and collapsing all of ListBox
Date: 02.08.05 02:34 (Tue, 2 Aug 2005 03:34:16 +0200)
From: Stefan Pantke

Am 02.08.2005 um 03:27 schrieb Seth Willits:

> On Aug 1, 2005, at 5:30 PM, Stefan Pantke wrote:
>
>> What is the supposed method to expand or collapse
>> all hierarchical rows of a ListBox?
>>
>> - Supposed method speaking of UI guidelines?
>> ALT-Key + Click on triangle?
>>
> I was telling my dad about this the other day.... I *swear* I've
> used at least one program that allowed option-clicking on a
> triangle to expand/collapse them all, but I can't for the life of
> me find one that does it whenever I try. But yes, Option-Clicking
> is something I often expect to work and I've actually implemented
> it in one of my own (Cocoa, not RB) programs. RB makes this a bit
> harder, I haven't a good clear thought on how you'd need to get it
> to work right now, but I'm off to the Garden of Olives for dinner...

This might be the point to code a much more intelligent list box ;-)

Kinds

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Expanding and collapsing all of ListBox
Date: 02.08.05 02:49 (Mon, 01 Aug 2005 18:49:51 -0700)
From: Terry Ford

On 1-Aug-05, at 6:27 PM, Seth Willits wrote:

> On Aug 1, 2005, at 5:30 PM, Stefan Pantke wrote:
>
>> What is the supposed method to expand or collapse
>> all hierarchical rows of a ListBox?
>>
>> - Supposed method speaking of UI guidelines?
>> ALT-Key + Click on triangle?
>>
> I was telling my dad about this the other day.... I *swear* I've
> used at least one program that allowed option-clicking on a
> triangle to expand/collapse them all, but I can't for the life of
> me find one that does it whenever I try. But yes, Option-Clicking
> is something I often expect to work and I've actually implemented
> it in one of my own (Cocoa, not RB) programs. RB makes this a bit
> harder, I haven't a good clear thought on how you'd need to get it
> to work right now, but I'm off to the Garden of Olives for dinner...

Sounds yummy. :)

>> - I'm in search of a method which allows to collapse()
>> or expand a row. I know, there is an event, but how
>> about a method to do this?
>>
> List.Expanded(row) = true/false
>
> Start from the top and go down.

I settled for simply writing a routine in the DoubleClick event for a
particular row. Hard to duplicate everything the Finder does in OSX
and maybe it's not cross platform. Something I really haven't
explored that much in Win32 apps as well. Oh well, I'm still a newbie
there. :)

Best,

Terry

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Expanding and collapsing all of ListBox
Date: 02.08.05 04:09 (Mon, 1 Aug 2005 20:09:21 -0700)
From: Seth Willits
On Aug 1, 2005, at 6:34 PM, Stefan Pantke wrote:

> This might be the point to code a much more intelligent list box ;-)

There are a great number of things REALbasic could learn from Cocoa.


Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Expanding and collapsing all of ListBox
Date: 02.08.05 04:37 (Mon, 1 Aug 2005 23:37:19 -0400)
From: Karen

On Aug 1, 2005, at 9:34 PM, Stefan Pantke wrote:

>> I was telling my dad about this the other day.... I *swear* I've
>> used at least one program that allowed option-clicking on a
>> triangle to expand/collapse them all, but I can't for the life of
>> me find one that does it whenever I try. But yes, Option-Clicking
>> is something I often expect to work and I've actually implemented
>> it in one of my own (Cocoa, not RB) programs. RB makes this a bit
>> harder, I haven't a good clear thought on how you'd need to get it
>> to work right now, but I'm off to the Garden of Olives for dinner...
>>
> This might be the point to code a much more intelligent list box ;-)
>

Actually I justed coded that this weekend... Clicking on alt/optipn
clicking on the disclosure triangle shows all children for that
parent item.

- karen

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Expanding and collapsing all of ListBox
Date: 02.08.05 09:24 (Tue, 02 Aug 2005 10:24:29 +0200)
From: Emile Schwarz
Do it in a loop like:

// Expand
//
For Idx = 0 To ListBox1.ListCount-1 // you can use a variable
If Not ListBox1.Expanded(Idx) Then
ListBox1.Expanded(Idx)
End If
Next

// Collapse
//
For Idx = 0 To ListBox1.ListCount-1 // you can use a variable
If ListBox1.Expanded(Idx) Then
ListBox1.Expanded(Idx)
End If
Next

Nota: the Language Reference said that Expanded apply only to hierarchical Rows
(created using AddFolder), so...

Information taken from the Language Reference [5.5.5], in the Examples section pool:

ListBox1.Expanded(1) = Not ListBox1.Expanded(1)

BTW:
> ALT-Key + Click on triangle?

Linux and Windows users: read Alt+<click-in-plus> instead of
Option-<click-in-disclosuire-triangle>

HTH,

Emile

PS: the latest Language Reference entry for Expanded says:

Property: ListBox.Expanded

Syntax: Expanded as Integer

Description: Used to get or set the expanded state of the row passed. The row
must have been added with the AddFolder method.

<email address removed> wrote:
> Subject: Expanding and collapsing all of ListBox
> From: Stefan Pantke <<email address removed>>
> Date: Tue, 2 Aug 2005 02:30:01 +0200
>
> What is the supposed method to expand or collapse
> all hierarchical rows of a ListBox?
>
> - Supposed method speaking of UI guidelines?
> ALT-Key + Click on triangle?
>
> - I'm in search of a method which allows to collapse()
> or expand a row. I know, there is an event, but how
> about a method to do this?

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>