[Datagrid] How to manage the empty area outside the selectable lines?
zryip.theslug at gmail.com
Mon Apr 26 14:52:14 EDT 2010
2010/4/26 Trevor DeVore <lists at mangomultimedia.com>:
> On Apr 24, 2010, at 6:31 PM, zryip theSlug wrote:
>> What is my best alternative if I assume that I have seen nothing in
>> the API to manage this empty area?
> Hmm, it looks like a couple of additional properties would help here. You
> need to know if 1) you clicked on a row or 2) you clicked in the area where
> data is displayed.
> I've added the following to the Data Grid in 4.5 :
> the dgClickLine
> the dgClickIndex
> the dgClickedInDataView
> To check if the user clicked in an empty area you would do the following in
> a data grid script:
> if the dgClickedInDataView of me and the dgClickIndex of me is empty then
> ## clicked in empty area
> end if
> I'm including the relevant code to the end of this email if you want to add
> it to your own data grid script. Just edit the script of btn "Data Grid" of
> stack "revDataGridLibrary".
I confess that I have bad habits with other tools. For example in the
visual studio's datagridview, you have always an empty line in the end
of the list to create a new line.
That this behavior I tried to reproduce here. However in the rev's
datagrid when you are at the end of the list you are at the end ;)
I have no problem with that.
Know if we are in an empty area is interesting anyway for other uses.
Thanks for the quick implementation, Trevor ;)
> No, not normal. I just tested this and noticed that rev does not report a
> scrollbar as the target of a mouseclick if the scrollbar thumb is not
> visible. I'm not sure why this is but it is what it is :-) I've added a
> workaround for this to the data grid code for 4.5.
It is as the scrollbar was transparent (a blendlevel near 100),
however it seems not, I checked ;)
Thanks for the code preview, I will give it a try ;)
-Zryip TheSlug- wish you the best! 8)
More information about the Use-livecode