Click and select a line in a table field
Posted: Mon May 05, 2008 4:28 pm
Can anyone confirm if it is possible to click on a line in a table field as the trigger to carry out a piece of code.
At the moment, I click on the line and use a button to detect the hilited line and do the code bit.
Why use two clicks if one will do?
Any ideas?
The actual code I use at the moment, with a button is :-
on mouseUp
global TableResult
set the itemdelimiter to tab
put the hilitedline of field "DaySkyResultsTable" into selectedLineInt --Get the selected row number
set the itemdelimiter to tab
put line selectedLineInt of field "DaySkyResultsTable" into itemsInFieldLine
put item 1 of ItemsInFieldLine into field "CurrentRoom"
put item 2 of ItemsInFieldLine into field "DayLightFactorFLD"
put item 3 of ItemsInFieldLine into field "WglazedArea"
put item 4 of ItemsInFieldLine into field "AroomArea"
put item 5 of ItemsInFieldLine into field "Rreflectance"
put item 6 of ItemsInFieldLine into field "Mcorrection"
put item 7 of ItemsInFieldLine into field "TglazedTrans"
put item 8 of ItemsInFieldLine into field "ThetaSky"
put item 9 of ItemsInFieldLine into field "FactorH"
put item 10 of ItemsInFieldLine into field "FactorY"
put item 11 of ItemsInFieldLine into field "FactorX"
put item 12 of ItemsInFieldLine into field "FactorD"
put item 13 of ItemsInFieldLine into field "RoomWidth"
put empty into line selectedLineInt of field "DaySkyResultsTable"
End Mouseup
At the moment, I click on the line and use a button to detect the hilited line and do the code bit.
Why use two clicks if one will do?
Any ideas?
The actual code I use at the moment, with a button is :-
on mouseUp
global TableResult
set the itemdelimiter to tab
put the hilitedline of field "DaySkyResultsTable" into selectedLineInt --Get the selected row number
set the itemdelimiter to tab
put line selectedLineInt of field "DaySkyResultsTable" into itemsInFieldLine
put item 1 of ItemsInFieldLine into field "CurrentRoom"
put item 2 of ItemsInFieldLine into field "DayLightFactorFLD"
put item 3 of ItemsInFieldLine into field "WglazedArea"
put item 4 of ItemsInFieldLine into field "AroomArea"
put item 5 of ItemsInFieldLine into field "Rreflectance"
put item 6 of ItemsInFieldLine into field "Mcorrection"
put item 7 of ItemsInFieldLine into field "TglazedTrans"
put item 8 of ItemsInFieldLine into field "ThetaSky"
put item 9 of ItemsInFieldLine into field "FactorH"
put item 10 of ItemsInFieldLine into field "FactorY"
put item 11 of ItemsInFieldLine into field "FactorX"
put item 12 of ItemsInFieldLine into field "FactorD"
put item 13 of ItemsInFieldLine into field "RoomWidth"
put empty into line selectedLineInt of field "DaySkyResultsTable"
End Mouseup