4Eyes Posted August 19, 2010 Posted August 19, 2010 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
picea892 Posted August 19, 2010 Posted August 19, 2010 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
4Eyes Posted August 19, 2010 Author Posted August 19, 2010 picea892, Excellent work. That fixed it perfectly. BTW, I dunno how you came up with that, but I'm pleased you did. Regards, 4Eyes
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now