I have a created a Datagrid with the both scrollbars set to Auto. I have also assigned Geometry to this Datagrid, so that when the stack resizes, the datagrid resizes with it (attached to the right and bottom of the stack). When I make the width of the stack smaller, I do not get the horizontal scrollbar on my datagrid (because of the amount of data, the vertical scrollbar is always visible).
Did I miss something?
Datagrids and Geometry
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Datagrids and Geometry
Hi,
Do you get the horizontal scrollbar if you resize the datagrid manually? Do the columns resize automatically when you resize the datagrid?
Mark
Do you get the horizontal scrollbar if you resize the datagrid manually? Do the columns resize automatically when you resize the datagrid?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 34
- Joined: Sun Feb 06, 2011 8:33 pm
Re: Datagrids and Geometry
No and No. When I drag the right side handles in the IDE, I get no scrollbars and the columns do not resize.
I have a behavior assigned to this DataGrid. Could it be that a message isn't being passed, so it doesn't know what to do?
I have a behavior assigned to this DataGrid. Could it be that a message isn't being passed, so it doesn't know what to do?
-
- Posts: 34
- Joined: Sun Feb 06, 2011 8:33 pm
Re: Datagrids and Geometry
I was able to fix the scrollbar issue by making the initial column widths large enough to force the scrollbar to appear in the IDE.
How do I make the columns automatically resize?
How do I make the columns automatically resize?
Re: Datagrids and Geometry
Hi,
I asked if the columns resized automatically, because that would explain why there is no horizontal scroll bar. I don't if there is a way to do this automatically without a script, but if I understand the documentation correctly, you can use the layoutControl message to resize controls and columns.
Honestly, I don't use the datagrid, so you'd probably better refer to the datagrid documentation. Perhaps, you can do the following in a datagrid group script (provided that you have 3 columns):
and probably this script in a field of your DG template:
This script would assume that the DG has 3 columns and in one of those columns 1 single field.
I hope this helps.
Kind regards,
Mark
I asked if the columns resized automatically, because that would explain why there is no horizontal scroll bar. I don't if there is a way to do this automatically without a script, but if I understand the documentation correctly, you can use the layoutControl message to resize controls and columns.
Honestly, I don't use the datagrid, so you'd probably better refer to the datagrid documentation. Perhaps, you can do the following in a datagrid group script (provided that you have 3 columns):
Code: Select all
on resizeControl
set the dgColumnWidth["Name"] of group "DataGrid" to the widht of grp "Data Grid" / 3
pass resizeControl
end resizeControl
Code: Select all
on layoutControl theRect
set the rect of fld "My Only Field" to theRect
end layoutControl
I hope this helps.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode