how to identify the list of *visible* items...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how to identify the list of *visible* items...

Chris Muller-3
in a PluggableListMorph.  Say, there are 100 items in the list, but I
want to identify just the ones that are visible within the scroll
range.

Any way to do that?

Many thanks..!

Reply | Threaded
Open this post in threaded view
|

Re: how to identify the list of *visible* items...

Bob Arning-2
how about this

{
self rowAtLocation: self topLeft + (3@3).
self rowAtLocation: self bottomLeft + (3@3 negated)
}

where self is the PLM

Cheers,
Bob

On 8/20/13 4:37 PM, Chris Muller wrote:
in a PluggableListMorph.  Say, there are 100 items in the list, but I
want to identify just the ones that are visible within the scroll
range.

Any way to do that?

Many thanks..!





Reply | Threaded
Open this post in threaded view
|

Re: how to identify the list of *visible* items...

Chris Muller-3
Awesome, thanks!  But what are the (3@3)'s for?

On Tue, Aug 20, 2013 at 3:54 PM, Bob Arning <[hidden email]> wrote:

> how about this
>
> {
> self rowAtLocation: self topLeft + (3@3).
> self rowAtLocation: self bottomLeft + (3@3 negated)
> }
>
> where self is the PLM
>
> Cheers,
> Bob
>
> On 8/20/13 4:37 PM, Chris Muller wrote:
>
> in a PluggableListMorph.  Say, there are 100 items in the list, but I
> want to identify just the ones that are visible within the scroll
> range.
>
> Any way to do that?
>
> Many thanks..!
>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: how to identify the list of *visible* items...

Bob Arning-2
edge conditions ;-) was worried about clicking too close to the edge.

On 8/20/13 5:05 PM, Chris Muller wrote:
Awesome, thanks!  But what are the (3@3)'s for?

On Tue, Aug 20, 2013 at 3:54 PM, Bob Arning [hidden email] wrote:
how about this

{
self rowAtLocation: self topLeft + (3@3).
self rowAtLocation: self bottomLeft + (3@3 negated)
}

where self is the PLM

Cheers,
Bob

On 8/20/13 4:37 PM, Chris Muller wrote:

in a PluggableListMorph.  Say, there are 100 items in the list, but I
want to identify just the ones that are visible within the scroll
range.

Any way to do that?

Many thanks..!