Jump to content
Sign in to follow this  
4Eyes

How to disable tabbing between controls?

Recommended Posts

4Eyes

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

Share this post


Link to post
Share on other sites
picea892

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

Share this post


Link to post
Share on other sites
4Eyes

picea892,

Excellent work. That fixed it perfectly.

BTW, I dunno how you came up with that, but I'm pleased you did.

Regards,

4Eyes

Share this post


Link to post
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
Sign in to follow this  

×