Jump to content

Ignore Control in TabOrder


water
 Share

Go to solution Solved by Melba23,

Recommended Posts

Using the Tab key in a GUI activates the next Control in the order defined when creating the GUI.
Now I want to ignore a Control (the question mark icon). This icon displays some help text using a ToolTip. When ignored the ToolTip should still be displayed.

When the user wants to jump to the next input Control he has to press Tab twice because the icon Control gets activated (which is not visible to the user) before the input Control gets activated.
Does anyone have a solution for this problem?

163766554_ShutterAuswahl_005.png.5de35a8062836cf12964142bee0915c7.png

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators
  • Solution

water,

Have you tried removing the $WS_TABSTOP style from the relevant control? It is a default setting when the icon control is created.

M23

Edited by Melba23
Speeling!

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

If it can help, I use it in scripts as Melba23 just indicated, with this code :

Case $idRadio_1
    $iHow_Choose_img = 1 ; a whole folder (no recursion) using FileSelectFolder()
    Remove_Style($WS_TABSTOP, $idRadio_1) ; cf note dans F10() , pareil pour tous les autres boutons radios ci-dessous.

Case $idRadio_2
    $iHow_Choose_img = 2 ; a whole folder + subfolders, using  FileSelectFolder()
    Remove_Style($WS_TABSTOP, $idRadio_2)

Case $idRadio_3
    $iHow_Choose_img = 3 ; pick files individually, using FileOpenDialog()
    Remove_Style($WS_TABSTOP, $idRadio_3)

;====================================================
Func Remove_Style($iStyleToRemove, $id1, $id2 = 0, $id3 = 0, $id4 = 0, $id5 = 0, _
    $id6 = 0, $id7 = 0, $id8 = 0, $id9 = 0, $id10 = 0)

    Local $hControl, $iStyle
    For $i = 1 To @NumParams - 1 ; @NumParams doit être compris entre 2 et 11. Le 1er paramètre sera toujours le style à ôter.
        $hControl = GUICtrlGetHandle(Eval("id" & $i))
        $iStyle = _WinAPI_GetWindowLong($hControl, $GWL_STYLE)
        If BitAND($iStyle, $iStyleToRemove) = $iStyleToRemove Then
            _WinAPI_SetWindowLong($hControl, $GWL_STYLE, BitXOR($iStyle, $iStyleToRemove))
        Endif
    Next

EndFunc ; Remove_Style()

The function can also be called like this (real syntax found in the script) :

Remove_Style($WS_TABSTOP, $idRadio_1, $idRadio_2, $idRadio_3, $idRadio_4, $idRadio_11, _
    $idRadio_12, $idRadio_13, $idToolTip, $idButton_OK, $idButton_Cancel)

 

Edited by pixelsearch
Link to comment
Share on other sites

You guys are absolutely amazing :thumbsup:
Thank you both for this solution, it works like a charm!

Unfortunately I can only mark a single post as solution :( So I marked Melba's post as the solution and pixelsearch's post got a like :)

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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...