Datagrid: Cannot set the width of scrollbar

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 195
Joined: Sat Apr 08, 2006 7:55 am
Contact:

Datagrid: Cannot set the width of scrollbar

Post by matthiasr » Fri Aug 19, 2011 7:30 pm

Hi,

i am trying set the width of the datagrid scrollbars

with

Code: Select all

set the dgProp[ "scrollbar width" ] of group "Datagrid 1" to 10
But regardless what numeric value i use the scrollbar disappears.
Setting it to auto brings the srollbar back.

Am i doing something wrong?

Matthias

dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 115
Joined: Wed Apr 08, 2009 11:54 pm

Re: Datagrid: Cannot set the width of scrollbar

Post by dickey » Sun Aug 21, 2011 11:48 pm

Hello Matthias,

I can confirm the behavior you have experienced.

By default, the "scrollbar" width is set to auto. http://lessons.runrev.com/s/lessons/m/d ... Properties then states you can set this to an integer.

So like you I assumed if I set it to say 100, the scrollbar width would adjust to the length I specify.

Code: Select all

on mouseUp
   put the dgProp[ "scrollbar width" ] of group "DataGrid 1" into tScrollbarWidth
   answer info tScrollbarWidth -- returns auto
   
   set the dgProp[ "scrollbar width" ] of group "DataGrid 1" to 100
   put the dgProp[ "scrollbar width" ] of group "DataGrid 1" into tScrollbarWidth
   answer info tScrollbarWidth -- returns 100 (the scrollbar width has therefore been set)
   
-- the scrollbar disappears
end mouseUp
I tried several other techniques with no success.

Not a solution, but at least you know someone else has had a look.

Kind regards, Andrew

Post Reply