Jump to content

How to disable tabbing between controls?


4Eyes
 Share

Recommended Posts

Folks,

I have a gui with some Combo boxes and a ListView created with $LVS_SINGLESEL. I use _GUICtrlListView_SetItemDropHilited() to select lines in the ListView. As I press tab repeatedly the various controls are selected, and when the LV is selected, it selects the top line. If I've already selected say the 3rd line, then I have 2 lines highlighted, which I do NOT want.

Help shows that $WS_TABSTOP is forced for Combo's (although not mentioned for LV's). Is there a way to disable tabbing around controls or 'unforce' $WS_TABSTOP?

Sorry, no example code as this is a pretty specific question.

Regards,

4Eyes

Link to comment
Share on other sites

Hi

Call this function immediately after a control is created

func no_tab() ;after control is created call this function to remove the tabstop if needed
    _WinAPI_SetWindowLong(GUICtrlGetHandle(-1), $GWL_STYLE, _
    BitAND(_WinAPI_GetWindowLong(GUICtrlGetHandle(-1), $GWL_STYLE), BitNOT($WS_TABSTOP)))
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...