Jump to content

Recommended Posts

  • Moderators
Posted (edited)

error471,

I think I have fixed the redrawing problem - try this version:

<snip>

That works nicely for me whether dragging in the same or between ListViews.

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

 

Posted (edited)

I confirm: Repaint is fixed.

Just as note :
ADD button fires such error:
 

  Quote

"C:\Users\user\Downloads\GUIListViewEx_Colour_Max.au3" (2035) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
If StringInStr(($aGLVEx_Data[0][13])[$iItem + 1][$iSubItem], ";") Then
If StringInStr(($aGLVEx_Data[0][13]^ ERROR
 

Expand  

 

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,

Very interesting, it errors in the LH ListView, but not in the RH one - Sherlock Holmes mode now activated!

M23

Edit: Found it - I was not forcing the correct colour array to be reloaded before redrawing.  Files re-uploaded in post #21.

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 (edited)

UP DOWN not allways correctly repaint Colors.

Edited by mLipok
typo

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,

That might well be the same problem - standby.....

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

mLipok,

It was the same problem - re-uploaded the files in #21 for a second time.

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 confirm as fixed.
 

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

error471,

Glad you like it - I am now polishing it before release.

As to the "save to/load from file" functions, the UDF returns content/checkbox/colour arrays from existing ListViews and also allows you to load these arrays into new ones. AutoIt provides excellent _FileWriteFromArray/_FileReadToArray functions - so write your own wrappers if you really feel the need, I am certainly not going to!

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

Thanks for you efforts. You helped me a lot.

I have a question concerning the  _FileWriteFromArray/_FileReadToArray functions. If I use _FileWriteFromArray I will have two files: content and colours. What I do not know at the moment is, how to load the colours, after loading the content. Is _GUIListViewEx_ReadToArray the right function? 

  • Moderators
Posted

error471,

Looking at the example script I posted:

; Create colour array - must be 0-based - RGB hex "text;back"
Global $aColArray_1[5][6] = [[";", ";0xFF0000", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";0x000000"]]
; Load colour array
_GUIListViewEx_LoadColour($iLVIndex_1, $aColArray_1)

What function do you think loads the colours into the ListView?

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)

Just to add something to the pile, I found this UDF for tables / colors display to be exceptionally simple to use (moreso than a listview)... Could be something you might want to look at, or maybe not :)

 

 

Table.au3

Edited by kaisies
Posted
  On 1/20/2016 at 7:26 PM, Melba23 said:

error471,

Looking at the example script I posted:

; Create colour array - must be 0-based - RGB hex "text;back"
Global $aColArray_1[5][6] = [[";", ";0xFF0000", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";"], _
               [";", ";", ";", ";", ";", ";0x000000"]]
; Load colour array
_GUIListViewEx_LoadColour($iLVIndex_1, $aColArray_1)

What function do you think loads the colours into the ListView?

M23

Expand  

I understand now. I think it will be difficult with my skills, but I think I can handle it.

 

@Melba23, I see big potential in GUIListViewEx.au3 with the colour integration. With the save and load to file function It could become a serious alternative to Excel, since Excel can't handle autosum according to colours without VBA. I am not sure if you are aware of that...

  • Moderators
Posted

error471,

  Quote

With the save and load to file function It could become a serious alternative to Excel

Expand  

You are joking, I trust - there is absolutely no comparison between the two.

  Quote

 I think it will be difficult with my skills

Expand  

If you get and save the colour array once you have set the required colours, you just read it back and reload it - what is hard about that?

I am away for the next few days, if you have any problems with the UDF over this period then just post them here and I will try to resolve with them when I return.

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 1/20/2016 at 10:16 PM, Melba23 said:

You are joking, I trust - there is absolutely no comparison between the two.

Expand  

No, I am serious. I need only a few functions for my purpose. If I can script the saving/loading - maybe autosaving and backuping, I want to create a printable list, depending on the colour (=status) of the data. 

 

  On 1/20/2016 at 10:16 PM, Melba23 said:

I am away for the next few days, if you have any problems with the UDF over this period then just post them here and I will try to resolve with them when I return.

Expand  

Thank you.

  • Moderators
Posted (edited)

error471,

I will have a think about how you might do that over the weekend - see what you can come up with in the meantime.

Here is the latest version to play with while I am away:

<snip>

M23

Edited by Melba23
Removed Beta code

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

What exactly button "Colour 1-3,3" should do ?

 

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)

@Melba23:

I am integrating your script into my bakery project. I managed to save&load the content from&to a file, which was pretty easy, but the colour loading and saving does not to work with the standard _FileWriteFromArray and _FileReadToArray Functions. I haven't found a solution yet.

 

Edited by error471
Posted (edited)

Here is the the load problem:

 

Global $aColArray_1[20][20]
_FileReadToArray("C:\Users\H23\OneDrive\Scripts\0.2\database\2016_24_01_16_50_09_colors.db",$aColArray_1, 0, "|")
_ArrayDisplay($aColArray_1, "Colour", Default, 8) ;shows correctly
_GUIListViewEx_LoadColour($iLVIndex_1, $aColArray_1) ;<------does not work!

Array is displayed as it should. But _GUIListViewEx_LoadColour Function does not work.

 

Here is the save problem:

Case $cColour
    $aRet = _GUIListViewEx_ReturnArray(_GUIListViewEx_GetActive(), 2)
    _ArrayDisplay($aRet, "Colour", Default, 8) ;show correctly
    _FileWriteFromArray(@ScriptDir & "\database\" & @YEAR &"_" & @MDAY &"_" & @MON & "_" & @HOUR &"_"  & @MIN &"_"  & @SEC & "_colors" & ".db", $aRet, 1) ;does not save properly

Again, array is displayed as it should. But _FileWriteFromArray only saves ;|;|;|;|;|;|;|;|;| without colour codes.

Edited by error471

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