Jump to content

Recommended Posts

  • Moderators
Posted (edited)

[NEW RELEASE] - 11 Jan 15

Added: A new function (_GUITreeViewEx_SaveTV) to save the current TreeView (and checkbox state).

Changed: A number of function names have been altered to reflect that at present the UDF is mainly oriented towards checkbox management (but stick around... :whistle:). This is script breaking so please do look at the new names if you have already used the UDF in a script.

New zip below. :)


A recent thread dealt with getting TreeViews with checkboxes to automatically check/clear associated items when a checkbox was actioned. It seemed like a good idea for a UDF and so here it is. I think the examples are pretty self-explanatory: initialise a TreeView once it is filled, register the UDF NOTIFY handler and then check/clear some checkboxes! :D

Additional functionalities are the ability to check/clear ALL checkboxes in the TreeView and to stop the UDF acting on a previously initialised TreeView. There are also functions to fill/save a TreeView using a text string to define the item titles and the levels at which they should be created which has no link to the other UDF functions but seemeduseful to add. ;)

Here is a zip containing the UDF and examples in both MessageLoop & OnEvent mode:

GUITreeViewEx.zip

As always, comments, compliments and criticisms welcomed. :)

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

Very nice! ;)

I actually have a perfect use for this, thank you Melba! ^_^

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Posted

Melba23, Take a look at this post. The code utilizes the fact, that there is a unique correlation between the structure of a treeview and the levels of the treeview items, to store and restore the text items and structure of a treeview. That could be interesting for this example. To be able to store/restore the structure of a treeview would be valuable.

I would prefer names like _GUITreeViewEx_InitChecked and _GUITreeViewEx_Checked_All instead of _GUITreeViewEx_InitTV and _GUITreeViewEx_Adjust_All.

  • Moderators
Posted (edited)

LarsJ,

I agree a _SaveTV function would be a good idea - I shall look into creating one. As to your suggested function name changes, I agree that the specific "checkbox" ones could be better named, but I think I will retain the _InitTV name - who knows how the UDF might develop? I already have some ideas where I might go next. ;)

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

Thanks for sharing.

mLipok

btw.

added to:

https://www.autoitscript.com/wiki/User_Defined_Functions#Controls

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

I wonder if this UDF can use another one.

I am thinking about _GUIRegisterMsgEx () UDF.

I myself am trying to implement _GUIRegisterMsgEx () in my own solutions (although still not everywhere).

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 have had many discussions during the past year about whether to add a multi-messageregister UDF to AutoIt (there are 3 that I know of: yours, one from guinness and one from myself). In the last development period >I asked Jon about getting this functionality into core and his response was pretty clear, so a UDF is the only way to go. Although I believe that such a UDF would be a great advantage and make UDF writing very much easier, others are equally adamant that such a UDF should not be added as essentially it would need to replace the built-in function (because obviously all message registering would need to be done via the UDF or the entire chain would fail) and UDFs should offer something new and not just act as a workaround for an existing function. There was some work started on a subclassing UDF to achieve the same effect but that was never completed and was, in my opinion, a bit complex. I live in hope that we might one day get this functionality in AutoIt, but until then we are stuck with the method I use in this UDF of having separate handlers inside a single wrapper function. :(>

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

[NEW RELEASE] - 11 Jan 15

Added: A new function (_GUITreeViewEx_SaveTV) to save the current TreeView (and checkbox state).

Changed: A number of function names have been altered to reflect that at present the UDF is mainly oriented towards checkbox management (but stick around... :whistle:). This is script breaking so please do look at the new names if you have already used the UDF in a script.

New zip in the first post. :)

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

 

  • 6 months later...
Posted
  On 1/11/2015 at 1:17 PM, Melba23 said:

[NEW RELEASE] - 11 Jan 15

 

Added: A new function (_GUITreeViewEx_SaveTV) to save the current TreeView (and checkbox state).

Good afternoon
You can add a function that will remove the check mark in another subparagraph. How does it work when using two or more radio buttons in a group

Excuse for machine translation

  • Moderators
Posted

joiner,

You need a better machine translator!

  Quote

You can add a function that will remove the check mark in another subparagraph

Is this a request for a new function or an offer to provide one? At present, the UDF only reacts to checkmarks made by the user within the same tree path - it does not make changes to "another subparagraph".

  Quote

How does it work when using two or more radio buttons in a group

The UDF works with TreeViews, not radio buttons.

Try another translation site and perhaps post some code to explain the problem you are having.

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 7/20/2015 at 8:36 AM, Melba23 said:

 

The UDF works with TreeViews, not radio buttons.

:D You understood me

Whether but it is possible to realize the principle - a choice only of one subparagraph. In the others tags automatically are removed

  • Moderators
Posted

joiner,

From that I understand that you are asking me to add functions which will let you insert and delete elements into a TreeView. I am happy to tell you that you are in luck as amending this UDF to do that (and more) is what I have set myself as my AutoIt summer project. So stick around and see what results!

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
  • Moderators
Posted

Yashied,

Thanks - light begins to dawn! Did you use Russian telepathy to understand each other? I will see what I can do.

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

 

  • 3 weeks later...
  • Moderators
Posted (edited)

joiner,

Sorry it has taken so long, but I have finally got around to producing something. Does the new _GUITreeViewEx_AutoCheckExclude function in this Beta code do what you require?

<snip>

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

 

  • 4 weeks later...
  • Moderators
Posted

joiner,

  Quote

Конструктор предназначен для сборки различных модификаторов World of Tanks в один установочный пакет

Design for assembly of the various modifiers World of Tanks in one installation package

End of my interest in your requirements.

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

 

  • 6 months later...
Posted (edited)

How about function to init tree view from an array? Did you think about it to add to your UDF? It could load data from this structure:

  Quote

Food|Fruit|Apple
Food|Meat|Steak
Food|Meat|Chicken
Food|Dairy|Cheese
Drinks|Water|
Drinks|Fizzy|Cola
Drinks|Juice|Orange
Drinks|Hot Drinks|Tea
Drinks|Hot Drinks|Coffee

Expand  

 

Edited by maniootek

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