Dynamically turning on and off DataGrid Scroll Bar

Phil Davis revdev at pdslabs.net
Sat Nov 5 22:16:19 EDT 2011

On 11/5/11 6:19 PM, zryip theSlug wrote:
> On Sun, Nov 6, 2011 at 1:06 AM, Pete<pete at mollysrevenge.com>  wrote:
>> The selectionChanged message sent to the datagrid has two parameters: the
>> index of the line just clicked and the index of the line that was selected
>> before the click.  I'm not sure what you mean by "deselect" but if you mean
>> go back to the previously highlighted line, you can use the second
>> parameter to do that
> Another solution is to use the dgClickLine or dgClickIndex properties
> of the datagrid group:
> For a try, place this handler in the datagrid group script:
> on mouseUp
>    put the dgClickIndex of me
> end mouseUp

Or this one:

on selectionChanged pNewIndex, pOldIndex
     put pNewIndex
end selectionChanged

Phil Davis

>> If you mean you just don't want any line to be selected, you can set the
>> dghilitedline to zero (or maybe it's empty, can't remember which).
> The both syntaxes are working:
> set the dghilitedline of me to 0
> set the dghilitedline of me to empty
> Best regards,

Phil Davis

PDS Labs
Professional Software Development

More information about the Use-livecode mailing list