Jump to content

GUIListViewEx - BugFix Version 6 Apr 24


Melba23
 Share

Recommended Posts

Thank you M23,

I have a better understanding now. This is a better idea, and if I don't misunderstand, it will save some resources as this function will not check every time if there is an ongoing edit process.

I successfully implemented your function, this way :
 

Func DeleteRow()
    If _GUIListViewEx_EditProcessActive() <> 0 Then
        StopHotkeys()
        Send("{DELETE}")
        Return
    EndIf
    If _GUICtrlListView_GetSelectedCount($iIDListView) > 0 Then
        ; My delete code
    Else
        ; Error case
    EndIf
EndFunc

The only thing that bothers me is that I need to manually send the 'DELETE' key to my GUI. Otherwise, the first 'DELETE' keypress will not delete a char in the edit field.

 

PS : The function you typed in your example doesn't match the function in your UDF ( _GUIListViewEx_EditProcess() -> _GUIListViewEx_EditProcessActive() ).

May the force be with you.

Open AutoIt Documentation within VS Code

Link to comment
Share on other sites

  • Moderators

ValentinM,

Quote

This is a better idea

Thanks!

Quote

 it will save some resources as this function will not check every time if there is an ongoing edit process

Correct - which I why I went down that route.

As to the Delete key problem - how are you setting the HotKey to fire the DeleteRow function? Are you using modifiers or just the plain Delete key?

M23

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

I don't know what you call "modifiers" so I will try to go a bit deeper in details to be clear.

I have two functions that manages my hotkeys, StartHotkeys() and StopHotkeys().
So the only thing I do to get my Hotkeys firing my functions is for example :

HotKeySet("{DELETE}", "DeleteRow")

And sometimes in the app, I don't want the Hotkeys to be on (ie. when a file is loading, if my GUI doesn't have the focus,...), so when it happens I use StopHotkeys() that basically does the same thing without calling a function.

HotKeySet("{DELETE}")

 

Did I answer you correctly?

EDIT : Just googled "modifiers" and seems like it's just like pressing "Shift" or "Ctrl"... So I am not using modifiers for deleting rows.

Edited by ValentinM
LMGTFY

May the force be with you.

Open AutoIt Documentation within VS Code

Link to comment
Share on other sites

  • Moderators

ValentinM,

Quote

 I am not using modifiers

Which is what I suspected and why I asked. If you were to use modifiers for your HotKey than you would be able to use the simple {DELETE} key within the edit. That is why the modifiers exist.

M23

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

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   1 member

×
×
  • Create New...