(data grid) Can't get the text selected in the Edit Field When It Opens
Trevor DeVore
lists at mangomultimedia.com
Tue Jul 20 11:35:00 EDT 2010
On Jul 20, 2010, at 11:26 AM, Andre.Bisseret wrote:
> I have a data grid table in which I would like the text appears
> selected when an edit field is opened.
>
> I tried the following:
> 1 - created a button "My default column behavior"
> 2 - set the script of btn "My default column behavior" to the script
> of button "Default Column" of stack "revDataGridLibrary"
> 3 - set the dgProps["default column behavior"] of group "MyDataGrid"
> to the long id of btn "My default column behavior"
> 4 - In the script of the button added a line to the handler command
> EditValue as follow:
> command EditValue
> ##In order to select all text before opening
> set the dgTemplateFieldEditor["select text"] of the dgControl of
> me to true --ADDED LINE
> EditFieldText the long ID of me, the dgIndex of me, the dgColumn
> of me
> end EditValue
>
> 5 - verified that the handler: getProp dgDataControl was in the script
>
> Does not work here ;-(( the text of the edit field is not selected
> when the field is opened
I just created a new data grid in 4.5, created a column, customized it
using the "+" button in the prop inspector, edited the behavior, added
your code and it worked.
Have you confirmed that the EditValue handler in your script is being
called (try using a put statement)?
--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
More information about the use-livecode
mailing list