Check if a button within a JavaTable is enabled
How can I check if a button in a cell within a javatable is enabled/clickable.
I am looking for sumting like:-
msgbox JavaWindow("jwind").JavaTable("jtabl").Object.getC ellRenderer(0,26).isEnabled
What code is generated when you record clicking on tthe JavaButton.
When recording only the row selection is identified:-
Well what you need to do is to first select the Row and then use the .object.IsCellEditable(row,col) method to get the value of that particular cell, it will give either true or false.
This may resolved your problem...
I tired that but does not work.
isCellSelected and isCellEditable return true and false respectively, for enabled and disabled buttons. (same result regardless of button enabled/disabled)
Any other ideas?
I am confused now ... what you want to check whether the button inside that cell is enabled or disabled ?
If Yes .. then IsCellEditable will resolve ur problem ...
please correct me if i am getting you wrong ...
Yes, I want to check if the button inside a cell is enabled.
But iscelleditable always returns false, i guess it works only for editboxes which may be enabled/disabled. It is not working for the buttons as buttons are not editable.
There is a isenabled method but it accepts no parameters so it is for the table as a whole.
Oh ok.... well i did the same for checkboxes inside a JavaTable... I used the isCellEditable method to check the checkbox is enable for ON or not...
can you also try .object.GetValueAt(row,col) to check what this will return...... I am just giving hit and try ....
Also prior to fetching any value write one line of code is to first click on that cell.. i mean
I do not want to click on the cell with the button, this will start an action. I just want to check if its enabled.
When i try using GetValueAt it shows an error:-
Object doesn't support this property or method.
Code: msgbox JavaWindow("jwind").JavaTable("jtabl").Object.getV alueAt(0,0)
Got that function to work using to toString() but empty value is returned when checking for the cell with the button. So no means of knowing the button status with it.
msgbox JavaWindow("jwind").JavaTable("jtabl").Object.getV alueAt(0,0).toString()