Focus on DataGrid error

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Focus on DataGrid error

Post by townsend » Wed Jun 01, 2011 10:10 pm

I've got a DataGrid called, myGrid.
I create a Button, and place this code in there.

Code: Select all

     focus on group myGrid
I'm getting this error:
button "Button": execution error at line 2 (focus: not a valid control), char 1
Any idea why this won't work?

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Re: Focus on DataGrid error

Post by dglass » Thu Jun 02, 2011 3:20 am

TraversalOn not selected?

jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

Re: Focus on DataGrid error

Post by jesse » Thu Jun 02, 2011 6:59 am

The correct code for setting the focus on the datagrid is:

Code: Select all

   set the dgfocus  of group myGrid to true
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

Post Reply