Tree-type list
In this article is told about unusual using all known checking - standard ListBox. His(its) manage to modify thereby that was got something, like checking TreeView tree-type list. The Idea of the creation of such list appeared absolutely unexpectedly (for me anyway). Seamingly: well that else possible выжать from standard ListBox? Uzh излазили and избороздили him(it) along and across. However turned out to be that possible.
- In general, there is several variants to realization of the similar interface. We shall Consider them in order of the increase to difficulties of the understanding for beginning:
- in the most simplest performance, this can be simply several lists, assessed friend on friend, and alternately shown through characteristic Visible. In this case it is necessary will think up the procedure, which on event, for instance double call on one of the list, hides rest. Think, such on power even beginning Access designer.
- the second way requires certain preparing the programming VBA is here used one list, dynamically filled. The Contents will depend on importances of the list at moment clique. The Realization is founded on use UNION request. Possible, there was certainly and simply fill the list by means of AddItem, but idea of the use request was shown the most attractive.
Shall Comment mildly second way:
The Request UNION, what follows from name, inquiry for association. Under association will in this instance be understood association of the contents several tables, whence r given for list. ChrW(9660, 9658) this codes symbol (the triangle). One of them vertical, other horizontal. In principle You may change them on any others. For this Starting All program Standard Official Table symbol. We Choose the symbol, look, what beside it code, and insert in text of the module.
In professional applications usually add the interface to navigations with the help of hot keys . This really удобнее and in many events quicker, than clique the mouse. In given example aplying navigation at keys, to which we got accustomed, working with hereby TreeView.
It Is Thought that decision not yet final. Possible, for instance, arrange checking as class, enter the events of the accompaniment, removing "element" and other attributes classical TreeView. If it be conceived on question of the creation spec. symbol, that possible, probably, do their own symbols, look like иконки.
As example, привожу both variants with opened by code. Tables are used In example from program Storehouse dear Palarm since in the general-that not this idea arose without his(its) participations.
The Example, as so much for works, You may скачать below
Author: KrukVN
Size: 107 kB
It Is Added: 11.09.2007