[Datagrid] How to manage the empty area outside the selectable lines?
zryip.theslug at gmail.com
Sun Apr 25 15:55:45 EDT 2010
2010/4/25 Andre.Bisseret <Andre.Bisseret at inria.fr>:
> Bonjour TheSlug,
> one get,
> when clicking on the headers line: graphic "dgBackground"
> "" on the Hscrollbar: graphic "dgBackground"
> "" on the rows part: graphic "dgAlternatingRows"
> "" on the VscrollBar: graphic
I done the same observations when I tested. You obtain the
"dgBackground" or the "dgAlternatingRows" graphic, depending if you
have activated or not the alternating rows property of your grid.
> So it is possible to get "insensible" header line, horizontal scroll bar and
> the cornerPiece (bravo! sure I would not have think to this one ;-))
Thanks for the compliment. But I confess I would have preferred find
something more elegant ;)
> Thus one can script:
> on mouseUp
> if the short name of the target is not in "dgBackground,dgCornerPiece"
> if the dgIndex of the target is empty then beep 3 -- here dispatch
> "addLine" etc.
> end if
> end mouseUp
Can I suggest you to use "among the items" instead of "in" to prevent bugs?
I admit that is improbable in this case, but it's a good habit to have ;)
So instead of:
if the short name of the target is not in\
if (the short name of the target is among the items of\
Just a suggestion in case it could be useful ;)
> but the V scroll bar continue to beep like the empty rows part (even if one
> click beside a row whose is not empty)
> I tried different tricks but seems really impossible to distinguish the V
> scroll bar area from the rows area!!! (might be missing something?)
The datagrid background ends on the border of the group, so it include
the scrollbars. It seems difficult to do something by script at our
> Sorry no great help! only confirmation (and for me, learning; thanks ;-))
Thanks for your feedback about this, André! ;)
-Zryip TheSlug- wish you the best! 8)
More information about the Use-livecode