Thumbposition of vscrollbar in a group

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Thumbposition of vscrollbar in a group

Post by samjith » Wed Sep 30, 2015 11:56 am

How to get thumbposition of vscrollbar in a group?

I have number of group in stack, enclosed (groups inside a group) with a group and a scroll bar for scrolling. but i don't want that scrollbar when the group length is not longer than my stack.

I used this code, but doesn't works

Code: Select all

if the thumposition of group "group_name" > 0 then
set the scrollbarWidth of group "Scroll_group" to 0
end if 

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Thumbposition of vscrollbar in a group

Post by Klaus » Wed Sep 30, 2015 12:29 pm

Hi samjith,

looks like you cannot set the width of a scrollbar to 0, try to hide the scrollbar instead:
...
set the scrollbar of grp "Unscroll_group" to FALSE
...

Best

Klaus

samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Re: Thumbposition of vscrollbar in a group

Post by samjith » Wed Sep 30, 2015 12:39 pm

Thanks for the quick reply. :D

samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Re: Thumbposition of vscrollbar in a group

Post by samjith » Wed Sep 30, 2015 12:55 pm

The code is not working. seems some error

stack "BC": compilation error at line 369 (Properties: token is not a property) near "scrollbar", char 14

Code: Select all

   if the formattedHeight of group "Scroll_group" > the height of group "Scroll_group" then
         set the scrollbarWidth of group "Scroll_group" to 15
 else
set the scrollbarWidth of group "Scroll_group" to 0
end if 
this works

but if this code works

Code: Select all

set the scrollbar of grp "Scroll_group" to FALSE
then i can use it with dissolve (vissual effect)

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Thumbposition of vscrollbar in a group

Post by Klaus » Wed Sep 30, 2015 3:28 pm

Sorry, my fault, it must be:
...
set the Hscrollbar of group "Scroll_group" to TRUE/FALSE
## or
set the Vscrollbar of group "Scroll_group" to TRUE/FALSE
...

samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Re: Thumbposition of vscrollbar in a group

Post by samjith » Mon Oct 05, 2015 1:03 pm

Great man :D

Post Reply