Table Text Input Type highlighting cell contents on focus

Forums for specific tips, techniques and example code
Carl Johnson
Posts: 4
Joined: Wed Jul 14, 2010 12:44 pm

Table Text Input Type highlighting cell contents on focus

Postby Carl Johnson » Wed Jul 14, 2010 12:48 pm

Is there a way in Jade to highlight the contents of a table cell that has an input type of TextBox when that cell has focus without using a cell control?

The scenario that I have is that my table cell has the text "Enter field here", and I want this to be highlighted when that cell has focus so it gets removed when the User starts typing.

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Table Text Input Type highlighting cell contents on focus

Postby BeeJay » Wed Jul 14, 2010 3:16 pm

If you know that the current cell for the table has an inputType = Table.InputType_TextBox, then you can access the TextBox "cellControl" that has been automatically created to handle the Table.InputType_TextBox with code along the lines of the following:

Code: Select all

table.accessCell( table.row, table.column ).cellControl.TextBox
Cheers,
BeeJay.

Carl Johnson
Posts: 4
Joined: Wed Jul 14, 2010 12:44 pm

Re: Table Text Input Type highlighting cell contents on focus

Postby Carl Johnson » Wed Jul 14, 2010 5:08 pm

Thanks, that works perfectly.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 8 guests