Jump to content

Recommended Posts

Posted

Issue in GLVEx_Example_1

Step to reproduce:

  1. Run
  2. Click "Edit Right 5,0"
  3. Click "Edit Left Header 1"

Symptoms: after clicking "Edit Left Header 1" , ListView item is edited instead Header .

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted

mLipok,

Oops - a hangover from testing. I will check the other examples too - thanks for the report.

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:

  Reveal hidden contents

 

  • Moderators
Posted (edited)

[NEW VERSION] - 19 May 16

Added:

  • Pressing {BackSpace} will open an item for editing if the selected item is editable.
  • Column headers can now be edited using combos as well as simple text (see new _GUIListViewEx_LoadHdrData function) - Scriptbreaking change.
  • Ability to sort columns programmatically via new _GUIListViewEx_SortCol function

Fixed: A couple of small bugs.

New zip containing new UDF and several example scripts in first post.

M23

Edited by Melba23

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:

  Reveal hidden contents

 

Posted

In: GLVEx_Example_3

When I want to drag single row from Left to Right, then this is imposible but: How I can get Error message about "Different Col Number" ?

When I use CTRL + Arrows , going to the right and Edit is jumping to the left . Why the same is not in relation Top<>Bottom 

When I click in a single cell  and type some data, and now I click to different cell , this new data is not saved.

 

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 5/19/2016 at 12:30 PM, Melba23 said:

Pressing {BackSpace} will open an item for editing if the selected item is editable.

Expand  

Please provide option to change default {BackSpace} to any other combination for example '^{Insert}' .

 

 

 


in GLVEx_Example_4

Issue ??  :

Step to reproduce:

  1. Run
  2. in Right LV Move First Column "Peter" to second position > after "Paul".
  3. in Left LV  Click  Cell [0,0] and change text to XXXXX
  4. from Left LV  Move Row 0  to Row 0 in Right LV

Symptoms: Row is incorectly moved, Collums are inproper ordered, you can se that in Right LV   XXXXX text is in Cell [0,1]  instead [0,0].

Or this was your intention ?

 


In GLVEx_Example_5

Moving from "No delete & no drop"  >>>> "No external drag" - is awesome feature,
Why "No external drag" not allowing "Delete" ?
This two LV can be used as an Configuration Dialog when user can drag option from one LV to second LV.

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted (edited)

mLipok,

Answers:

--  There is no "insert marker" in the right ListView when you drag items into it which indicates that the drag will not work. Look at Ex 5 to see how this works in more detail - you only get an "insert marker" when the drag/drop operation is permitted.

--  When I move the current edit cell using "Ctrl-arrow" it moves perfectly in all directions - I do not understand what behaviour you are trying to explain. The behaviour of the up/down and left/right movement of the cells is set by the $iEditMode parameter passed when you call _GUIListViewEx_EditOnClick in the idle loop - as explained in the function header:

; $iEditMode      Return after single edit - 0 (default)
;                 {TAB} and ctrl-arrow keys move to next item - 2-digit code (row mode/column mode)
;                     0 = Cannot move
;                     1 = Reaching edge terminates edit process
;                     2 = Reaching edge remains in place
;                     3 = Reaching edge loops to opposite edge

--  Clicking in another cell will abandon the edit unless you set the correct $iAdded mode when initialising the ListView. To allow clicking elsewhere and retaining the previous edit you need mode 4:

; $iAdded    - 0      - No added features (default).  To get added features add any of the following values
; [...]
;              + 4    - Edit continues within same ListView by triple mouse-click on editable column

So use this initialisation line in the example and it will retain the edit when you click elsewhere:

; Initiate GLVEx - no array passed - count parameter set - default insert mark colour (black) - drag image - continue edit on click
$iLV_Left_Index = _GUIListViewEx_Init($cListView_Left, $aLV_List_Left, 1, 0, True, 4)

-- I will look into how the user could choose another "start edit" key.

M23

Edited by Melba23
Typo

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:

  Reveal hidden contents

 

Posted

Is there a way to use Edit with this UDF:

 

Is there a way to change Header text for example Summary = 150,00 £ 

?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted

mLipok,

-- There is currently no way to incorporate that code into the UDF to deal with the user input as it is entered. But as explained in the Guide, following an edit _GUIListViewEx_EditOnClick returns an array showing the previous and new content of any edited cells, so you can easily check whether the new content meets any particular criteria and reset the original content if it does not.

-- Again as explained in the Guide (you did read it before posting?) header content can be altered either by using Ctrl-click on the header (assuming you have correctly initiated the ListView - look at the $iAdded parameter again) or programmatically via _GUIListViewEx_EditHeader (you did look at the #CURRENT# function list?). If you use the _GUIListViewEx_LoadHdrData function you can even create a combo to edit the header.

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:

  Reveal hidden contents

 

Posted
  On 5/19/2016 at 1:52 PM, Melba23 said:

as explained in the Guide (you did read it before posting?) 

Expand  

Once. I think it's time to read it a few more times :D

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted

mLipok,

Good idea!

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:

  Reveal hidden contents

 

  • Moderators
Posted (edited)

mLipok,

Try this Beta: <snip>

Look for the _GUIListViewEx_SetEditKey function:

; Syntax.........: _GUIListViewEx_SetEditKey($sKey)
; Parameters ....: $sKey - String of key(s): Up to 2 modifers (^ = Ctrl, ! = Alt) plus main key code as _IsPressed

So

_GUIListViewEx_SetEditKey("^2D")

will set Ctrl-Insert as you requested above.

M23

Edited by Melba23
Beta code removed

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:

  Reveal hidden contents

 

  • Moderators
Posted

mLipok,

I have just seen your edits above:

-- Ex 4: That is a Windows "feature" and nothing to do with my UDF. When you rearrange the headers, Windows keeps track of which is which - you use _GUICtrlListView_GetColumnOrder to find out the current order. When you drop a row into another ListView, Windows automatically places the content of each column in the "correct" column, as in the case you specify.

-- Ex 5: Explain exactly what you want to happen when dragging between the two ListViews.

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:

  Reveal hidden contents

 

Posted (edited)
  On 5/19/2016 at 2:55 PM, Melba23 said:

mLipok,

Try this Beta: GUIListViewEx.au3

Look for the _GUIListViewEx_SetEditKey function:

; Syntax.........: _GUIListViewEx_SetEditKey($sKey)
; Parameters ....: $sKey - String of key(s): Up to 2 modifers (^ = Ctrl, ! = Alt) plus main key code as _IsPressed

So

_GUIListViewEx_SetEditKey("^2D")

will set Ctrl-Insert as you requested above.

M23

Expand  

Almost perfect, as there is some small issue with first use.
Step to reproduce:

  1. Run example 3
  2. Click Left ListView
  3. press  Ctrl-Insert

Symptoms:
Focus is moved to RowMode Combobox instead entering in edit mode for selected Row.
Remark:
If I click again in LV thent this feature works correctly.

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted

mLipok,

I cannot reproduce that - as long as I have an item selected in the left ListView it opens for editing when the HotKey is pressed.

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:

  Reveal hidden contents

 

Posted

I modify example 3 by adding this two additional lines:

; Create Left ListView
GUICtrlCreateLabel("Native ListView", 10, 5, 300, 35)
$cListView_Left = GUICtrlCreateListView("Tom|Dick|Harry", 10, 40, 300, 300, $LVS_SINGLESEL)
_GUICtrlListView_SetExtendedListViewStyle($cListView_Left, $LVS_EX_FULLROWSELECT)
_GUICtrlListView_SetColumnWidth($cListView_Left, 0, 93)
_GUICtrlListView_SetColumnWidth($cListView_Left, 1, 93)
_GUICtrlListView_SetColumnWidth($cListView_Left, 2, 93)
_GUICtrlListView_SetInsertMarkColor($cListView_Left, 0)
_GUIListViewEx_SetEditKey("^2D")
MsgBox(0, '', @error)

If I comment this :

#cs
    MsgBox(0, "Active ListView", $sMsg)

    MsgBox(0, "Info", "The Left ListView has 20 empty rows" & @CRLF & "each of 3 cells which can be edited" & @CRLF & _
    "Use Ctrl-arrow to move edit from cell to cell" & @CRLF & "<--------------------------")

#CE

All works OK.

This issue is fully reproducible on my Win10 x64

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted

mLipok,

My Win7 x32 does not show anything of the sort - we need another tester.

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:

  Reveal hidden contents

 

Posted

"D:\Scripts\Includes\GUIListViewEx.au3" (4163) : ==> Variable used without being declared.:
$iOldESC = Opt("GUICloseOnESC", 0)
^ ERROR

$iOldESC not declared in __GUIListViewEx_EditProcess?

  • Moderators
Posted

dmob,

Sorry about that - it will be declared in the next release.

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:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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