Hi everybody,
I placed a transparent shape object on the grid in order to disable grid operations if I'm not in EditMode. If I'm in EditMode I set visiblity property to .f., otherwise to .t. All works fine. Now I want to be able to scroll my grid even in non EditMode. So, I want to substract ScrollBar width from width, if Grid has a vertical ScrollBar and height from height if it has a horisontal SrollBar.
So, there are two questions: how can I determine their width and hight (I checked SYSMETRIC function Help, but it says about EditBox, are Grid ScrollBars the same as for EditBox?), I need to determine, does the grid has either of them and I also want to know, if the control has ScrollBars (since the class is generic and not necessary would be used for covering grids).
Here is my code so far. BTW, another problem, that shapes don't have resize method. So, if my grid would be re-sized in run-time of the form, what should I do?
if type('this.parent.'+this.cHostName)="O" && The parent object is already instantiated
local lnScrollBarHeight, lnScrollBarWidth
lnScrollBarHeight=
this.top=evaluate('this.parent.'+this.cHostName+'.top')
this.left=evaluate('this.parent.'+this.cHostName+'.left')
this.width=evaluate('this.parent.'+this.cHostName+'.width')
this.height=evaluate('this.parent.'+this.cHostName+'.height')
endif
If it's not broken, fix it until it is.
My Blog