Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Locate selected tab
#1
A window has a certain number of tabs one of which is selected. I access any of these tabs using :

Acc a.Find(w "PAGETAB" "tab_name" "class=TTabControl" 0x1005)

and I can find if it is selected using
int state=a.State
out state&STATE_SYSTEM_SELECTED

My intention is to locate the selected tab. What I do at present is to navigate through them and check each one's state. I stop when found. I wonder whether there exists a simpler way to do it. Many thanks in advance.
#2
Look in dialog "Find accessible object", it can find object that has some state.
#3
Thank you!

As a matter of fact, I have used :
Acc a.Find(w "PAGETAB" "" "class=TTabControl[]state=0x300002 0" 0x1004)

but it failed to locate the tab selected. It locates just the first tan in the series. That is why I used navigate. I would appreciate it if you could kindly advice.
#4
In the state field click the button and check Use by that style.
#5
I cannot understand what is "Use by that style".

I attach a screen capture. Thanks for your advice.


Attached Files Image(s)
   
#6
Click the state numbers field, then click the temporary blank button.
#7
I am sorry, but I cannot understand what you mean by " temporary blank button. ". I have included a snapshot, could you please advise on the basis of this snapshot? I would also appreciate it if you could advice me on the "a.Find" statement that I should use. I am again sorry for disturbing, nevertheless I cannot understand what I am doing wrong. Best regards.
#8
   
That gray rectangle.
#9
Thank you very much. Now it works perfectly. I am sorry but I was not able to see this temporary blank button. The snapshot you posted helped me to find out. Best personal regards.


Forum Jump:


Users browsing this thread: 3 Guest(s)