I was wondering if there was a scroll location control for a para. For example, if you wanted to print out a phone book contact list (many screens in length) and wanted to start focused on a particular entry. I didn't study the documentation intently, forgive me if I over looked a manual page. -- Chapak Patrick Smith
no, but there are for stacks and flows… iirc, it's just flow :scroll => true On Sat, May 29, 2010 at 12:36 PM, Patrick Smith <chapak@gmail.com> wrote: > I was wondering if there was a scroll location control for a para. > For example, if you wanted to print out a phone book contact list > (many screens in length) and wanted to start focused on a particular > entry. > > I didn't study the documentation intently, forgive me if I over looked > a manual page. > > -- > > Chapak Patrick Smith > -- ~devyn
In my limited experience, when you stuff a stack with flows of styled para's, a few thousand lines long, Shoes only works if you are extremely patient about redraw speed. There is no grid layout or table widget. listboxes scroll nicely with lots of line items but they can't be styled. Don't try to make Shoes::Widget work. It can't communicate complex layouts or needed events from the widget to the scripts. A _why acknowledged problem. On Sat, 2010-05-29 at 22:48 -0700, Devyn Cairns wrote: > no, but there are for stacks and flows… iirc, it's just flow :scroll > => true > > On Sat, May 29, 2010 at 12:36 PM, Patrick Smith <chapak@gmail.com> > wrote: > I was wondering if there was a scroll location control for a > para. > For example, if you wanted to print out a phone book contact > list > (many screens in length) and wanted to start focused on a > particular > entry. > > I didn't study the documentation intently, forgive me if I > over looked > a manual page. > > -- > > Chapak Patrick Smith > > > > -- > ~devyn
On Sat, May 29, 2010 at 11:50 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > In my limited experience, when you stuff a stack with flows of styled > para's, a few thousand lines long, Shoes only works if you are > extremely patient about redraw speed. There is no grid layout or table > widget. listboxes scroll nicely with lots of line items but they can't > be styled. > > Don't try to make Shoes::Widget work. It can't communicate complex > layouts or needed events from the widget to the scripts. A _why > acknowledged problem. > Yup. Just make your own basic widget classes and pass the Shoes app to their constructors. > > On Sat, 2010-05-29 at 22:48 -0700, Devyn Cairns wrote: > > no, but there are for stacks and flows… iirc, it's just flow :scroll > > => true > > > > On Sat, May 29, 2010 at 12:36 PM, Patrick Smith <chapak@gmail.com> > > wrote: > > I was wondering if there was a scroll location control for a > > para. > > For example, if you wanted to print out a phone book contact > > list > > (many screens in length) and wanted to start focused on a > > particular > > entry. > > > > I didn't study the documentation intently, forgive me if I > > over looked > > a manual page. > > > > -- > > > > Chapak Patrick Smith > > > > > > > > -- > > ~devyn > > > -- ~devyn
Hi Patrick and folks,
How about this one?
I'm not sure this is what you want to do, though...
Shoes.app do
stack top: 30, left: 30, width: 300, height: 300, scroll: true do
100.times do |i|
flow do
bg = background(pink).hide
para "phone number #{i}"
hover{bg.show}
leave{bg.hide}
click{alert "hi! no.#{i}"}
end
end
end
end
Hope this helps,
ashbb
On Sun, May 30, 2010 at 12:40 AM, ashbb <ashbbb@gmail.com> wrote: > Hi Patrick and folks, > > How about this one? > I'm not sure this is what you want to do, though... > > Shoes.app do > stack top: 30, left: 30, width: 300, height: 300, scroll: true do > 100.times do |i| > flow do > bg = background(pink).hide > para "phone number #{i}" > hover{bg.show} > leave{bg.hide} > click{alert "hi! no.#{i}"} > end > end > end > end > > yeah, that's what he wants… problem is, if the list is huge, Shoes takes a long time to redraw (it draws everything, not just what's on screen :-( ) > Hope this helps, > ashbb > -- ~devyn
Hi Devyn, > problem is, if the list is huge, Shoes takes a long time > to redraw (it draws everything, not just what's on screen :-( ) Ohhh,.... You are right. Umm... okay, how about the following? This is not an ultimate solution, but a bit more good, IMHO. ;-) Shoes.app do bgs = [] 9.times do |i| bgs << background(pink, top: 30+34*i, left: 30, width: 270, height: 30).hide end s = stack top: 30, left: 30, width: 300, height: 300, scroll: true do 1000.times{|i| para "phone number #{i}"} end 9.times do |i| flow top: 30+34*i, left: 30, width: 270, height: 30 do border black hover{bgs[i].show} leave{bgs[i].hide} click{alert "hi! no. #{s.scroll_top.zero? ? i : (s.scroll_top + 10) / 34 + i}"} end end end Cheers, ashbb