Page 1 of 1
dgVScroll & dgHScroll of a datagrid
Posted: Wed Feb 02, 2011 3:52 pm
by richh
I am not sure if I encountered a bug or not.. but I am trying to get the scroll status for the vertical and horizontal of a datagrid.
after reading the online docs, I am using:
Code: Select all
put the dgVScroll of group "Datagrid 1" into VSValue
put the dgHScroll of group "Datagrid 1" into HSValue
regardless of if I set hScrollbar or vScrollbar to true, false, auto.... the values always returns 0
Re: dgVScroll & dgHScroll of a datagrid
Posted: Thu Feb 03, 2011 2:33 pm
by trevordevore
Can you confirm if the following experiment works?
1) Create new stack.
2) Drag data grid from tools palette onto stack.
3) Open object inspector for data grid and use Contents pane to enter enough lines so that the vertical scrollbar appears.
4) Drag the vertical scrollbar to the bottom.
5) In the message box execute the following code:
put the dgVScroll of group "DataGrid 1"
Does the message box report a value > 0?
Re: dgVScroll & dgHScroll of a datagrid
Posted: Fri Feb 04, 2011 3:51 pm
by richh
I tried your steps and the value does increase past 0.
Then I guess I am confused. I thought from the docs that dgVScroll and dgHScroll controlled weather or not the Vertical or Horizontal of a datagrid would show the scroll bar.
I went back to my code and starting playing around with hScrollbar and hScrollbar and found that they returned false.
by chance, do you know what properties hold the date for weather or not the horizontal / vertical is set to true, false or auto?
thank you in advance
Re: dgVScroll & dgHScroll of a datagrid
Posted: Fri Feb 04, 2011 3:53 pm
by trevordevore
You are looking for "show vscrollbar" and "show hscrollbar".
the dgProp["show vscrollbar"] of group "Datagrid"
the dgProp["show hscrollbar"] of group "Datagrid"
You can read about them on the API page of the docs:
http://lessons.runrev.com/spaces/lesson ... Properties
Re: dgVScroll & dgHScroll of a datagrid
Posted: Sat Feb 05, 2011 12:22 am
by richh
thats it... thank you soooo much Trever...
I have been looking at the lession of Data Grid on the site, but I was looking at the Data Grid API section (one page over).
