Dynamically turning on and off DataGrid Scroll Bar

Pete pete at mollysrevenge.com
Sat Nov 5 20:06:54 EDT 2011


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

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).

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Sat, Nov 5, 2011 at 4:33 PM, Michael Doub <mike at doub.com> wrote:

> Yep that did the trick.
>
> Is there a way to capture the line or index to the entry that the user
> clicks or touches without using the dgHilitedLines?   If there is no other
> way, then how does one deselect the line after responding to the
> interaction?
>
> -= Mike
>
>
>
>
> On 2011-11-05, at 3:29 PM, Michael Doub wrote:
>
> > I am trying to dynamically turn on and off a data grid scroll bar for
> testing a mobile app and am having difficulty.   Is there another property
> that I should be setting?
> >
> > on preOpenCard
> >   if the environment is "mobile" then
> >      set the vScrollbar of group "DataGrid" to false
> >      setup_scroller
> >   else
> >      set the vScrollbar of group "DataGrid" to true
> >   end if
> >   put create_the_data ("Contacts") into tdata
> >   set the dgData of group "DataGrid" to tdata
> > end preOpenCard
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the use-livecode mailing list