Skip to content

Commit 7a230c1

Browse files
authored
Update to v2.9.1
1 parent 6ebdc34 commit 7a230c1

File tree

3 files changed

+328
-6
lines changed

3 files changed

+328
-6
lines changed

ShellTreeDemo.tbform

Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
[
2+
{
3+
"AlwaysShowKeyboardCues": false,
4+
"Appearance": "vbAppear3d",
5+
"AutoRedraw": false,
6+
"BackColor": -2147483633,
7+
"BorderStyle": "vbSizable",
8+
"Caption": "ucShellTree Demo",
9+
"ClipControls": true,
10+
"ControlBox": true,
11+
"DrawMode": "vbCopyPen",
12+
"DrawStyle": "vbSolid",
13+
"DrawWidth": 1,
14+
"Enabled": true,
15+
"FillColor": 0,
16+
"FillStyle": "vbFSTransparent",
17+
"FontBold": false,
18+
"FontItalic": false,
19+
"FontName": "Segoe UI",
20+
"FontSize": 8,
21+
"FontStrikethru": false,
22+
"FontTransparent": true,
23+
"FontUnderline": false,
24+
"ForeColor": -2147483630,
25+
"FormDesignerId": "{66B02E82-E553-4CBF-BFBE-BDD5AB49C2E8}",
26+
"HasDC": true,
27+
"Height": 410,
28+
"HelpContextID": 0,
29+
"Icon": "",
30+
"Index": -1,
31+
"KeyPreview": false,
32+
"Left": 0,
33+
"LinkMode": "vbLinkNone",
34+
"LinkTopic": null,
35+
"MDIChild": false,
36+
"MaxButton": true,
37+
"MaxHeight": 0,
38+
"MaxWidth": 0,
39+
"MinButton": true,
40+
"MinHeight": 0,
41+
"MinWidth": 0,
42+
"MouseIcon": "",
43+
"MousePointer": "vbDefault",
44+
"Moveable": true,
45+
"Name": "ShellTreeDemo",
46+
"NegotiateMenus": false,
47+
"OLEDropMode": "vbOLEDropNone",
48+
"Opacity": 100,
49+
"Palette": "",
50+
"PaletteMode": "vbPaletteModeHalftone",
51+
"Picture": "",
52+
"PictureDpiScaling": true,
53+
"RightToLeft": false,
54+
"ScaleHeight": 410,
55+
"ScaleLeft": 0,
56+
"ScaleMode": "vbPixels",
57+
"ScaleTop": 0,
58+
"ScaleWidth": 336,
59+
"ShowInTaskbar": true,
60+
"StartupPosition": "vbStartUpScreen",
61+
"TabFocusAutoSelect": false,
62+
"Tag": null,
63+
"Top": 0,
64+
"TopMost": false,
65+
"TransparencyKey": -1,
66+
"Visible": true,
67+
"WhatsThisButton": false,
68+
"WhatsThisHelp": false,
69+
"Width": 336,
70+
"WindowState": "vbNormal",
71+
"__IDEOptions": {
72+
"alignToGrid": false,
73+
"gridHeight": 10,
74+
"gridWidth": 10,
75+
"lockedControls": [],
76+
"showGrid": true,
77+
"showOutlines": false
78+
},
79+
"__lastUpdateMarker": 771932016,
80+
"_children": [
81+
{
82+
"ActiveDropHoverTime": 2500,
83+
"Align": false,
84+
"AlwaysShowExtendedVerbs": false,
85+
"Anchors": {
86+
"Bottom": false,
87+
"Left": true,
88+
"Right": false,
89+
"Top": true,
90+
"_className": "Anchors",
91+
"_clsid": "{8524D4B5-72A9-40A9-A189-29E7905C40CA}"
92+
},
93+
"AutoExpandComputer": true,
94+
"AutoExpandLibraries": true,
95+
"AutoHScroll": true,
96+
"Autocheck": false,
97+
"BackColor": -2147483643,
98+
"BorderStyle": "STBS_Standard",
99+
"CausesValidation": false,
100+
"Checkboxes": false,
101+
"ComputerAsRoot": false,
102+
"CustomRoot": "",
103+
"DisableDragDrop": false,
104+
"DisableWow64Redirect": false,
105+
"Dock": "vbDockNone",
106+
"DragIcon": "",
107+
"DragMode": "vbManual",
108+
"EnableShellMenu": true,
109+
"Enabled": true,
110+
"ExclusionChecks": false,
111+
"ExpandZip": false,
112+
"ExplorerStyle": true,
113+
"ExtendedOverlays": false,
114+
"FadingExpandos": true,
115+
"Font": {
116+
"Bold": false,
117+
"Italic": false,
118+
"Name": "MS Sans Serif",
119+
"Size": 8.25,
120+
"Strikethru": false,
121+
"Underline": false
122+
},
123+
"ForeColor": -2147483640,
124+
"FullRowSelect": true,
125+
"HasButtons": true,
126+
"Height": 354,
127+
"HelpContextID": 0,
128+
"HorizontalScroll": true,
129+
"IconSize": 24,
130+
"Index": -1,
131+
"InfoTipOnFiles": true,
132+
"InfoTipOnFolders": false,
133+
"ItemFilter": "*.*",
134+
"ItemFilterFilesOnly": true,
135+
"LabelEditRename": true,
136+
"Left": 7,
137+
"MonitorDirChanges": true,
138+
"MultiSelect": false,
139+
"Name": "ucShellTree1",
140+
"NameColors": true,
141+
"NoIndentState": false,
142+
"PlayNavigationSound": true,
143+
"RootHasCheckbox": false,
144+
"ShowFavorites": false,
145+
"ShowFiles": false,
146+
"ShowHiddenItems": "STHP_UseExplorer",
147+
"ShowLines": false,
148+
"ShowQuickAccessOnWin10": false,
149+
"ShowSelAlways": true,
150+
"ShowSuperHidden": "STSHP_UseExplorer",
151+
"SingleClickExpand": false,
152+
"SingleExpand": false,
153+
"TabIndex": 1,
154+
"TabStop": true,
155+
"Tag": null,
156+
"ToolTipText": null,
157+
"Top": 44,
158+
"TrackSelect": true,
159+
"Visible": true,
160+
"WhatsThisHelpID": 0,
161+
"Width": 322,
162+
"_IPersistStreamData": "6urq6pOyAADMAAAACwANAJRz5eEoAAAAcwBoAG8AdwBmAGEAdgBvAHIAaQB0AGUAcwAAAAsACQC3NSE6IAAAAGEAdQB0AG8AYwBoAGUAYwBrAAAACwAWACIpLjQ8AAAAcwBoAG8AdwBxAHUAaQBjAGsAYQBjAGMAZQBzAHMAbwBuAHcAaQBuADEAMAAAAAAAAwAIAAvyV0cgAAAAXwBlAHgAdABlAG4AdAB4AEghAAADAAgACvJXR1z///9fAGUAeAB0AGUAbgB0AHkAliQAAA==",
163+
"_className": "tbShellTree.ucShellTree",
164+
"_clsid": "{43C02F35-3CE8-4D19-A139-028E05C7EBE5}"
165+
},
166+
{
167+
"Alignment": "vbLeftJustify",
168+
"Anchors": {
169+
"Bottom": false,
170+
"Left": true,
171+
"Right": false,
172+
"Top": true,
173+
"_className": "Anchors",
174+
"_clsid": "{8524D4B5-72A9-40A9-A189-29E7905C40CA}"
175+
},
176+
"Appearance": "vbAppear3d",
177+
"AutoSize": true,
178+
"BackColor": -2147483633,
179+
"BackStyle": "vbBFOpaque",
180+
"BorderStyle": "vbNoBorder",
181+
"Caption": "",
182+
"DataField": null,
183+
"DataFormat": null,
184+
"DataMember": null,
185+
"DataSource": null,
186+
"Dock": "vbDockNone",
187+
"DragIcon": "",
188+
"DragMode": "vbManual",
189+
"Enabled": true,
190+
"FontBold": false,
191+
"FontItalic": false,
192+
"FontName": "Segoe UI",
193+
"FontSize": 8.25,
194+
"FontStrikethru": false,
195+
"FontUnderline": false,
196+
"ForeColor": -2147483630,
197+
"Height": 18,
198+
"Index": -1,
199+
"Left": 3,
200+
"LinkItem": null,
201+
"LinkMode": "vbLinkNone",
202+
"LinkTimeout": 50,
203+
"LinkTopic": null,
204+
"MouseIcon": "",
205+
"MousePointer": "vbDefault",
206+
"Name": "Label1",
207+
"OLEDropMode": "vbOLEDropNone",
208+
"RightToLeft": false,
209+
"TabIndex": 2,
210+
"Tag": null,
211+
"ToolTipText": null,
212+
"Top": 25,
213+
"UseMnemonic": true,
214+
"Visible": true,
215+
"WhatsThisHelpID": 0,
216+
"Width": 272,
217+
"WordWrap": false,
218+
"_className": "Label",
219+
"_clsid": "{33AD4ED8-6699-11CF-B70C-00AA0060D393}",
220+
"_paintedByParent": true
221+
},
222+
{
223+
"Anchors": {
224+
"Bottom": false,
225+
"Left": true,
226+
"Right": false,
227+
"Top": true,
228+
"_className": "Anchors",
229+
"_clsid": "{8524D4B5-72A9-40A9-A189-29E7905C40CA}"
230+
},
231+
"Appearance": "vbAppear3d",
232+
"BackColor": -2147483633,
233+
"Cancel": false,
234+
"Caption": "Open to Windows",
235+
"CausesValidation": true,
236+
"Default": false,
237+
"DisabledPicture": "",
238+
"Dock": "vbDockNone",
239+
"DownPicture": "",
240+
"DragIcon": "",
241+
"DragMode": "vbManual",
242+
"Enabled": true,
243+
"FontBold": false,
244+
"FontItalic": false,
245+
"FontName": "Segoe UI",
246+
"FontSize": 8,
247+
"FontStrikethru": false,
248+
"FontUnderline": false,
249+
"ForeColor": -2147483630,
250+
"Height": 26,
251+
"HelpContextID": 0,
252+
"Index": -1,
253+
"Left": 7,
254+
"MaskColor": 12632256,
255+
"MouseIcon": "",
256+
"MousePointer": "vbDefault",
257+
"Name": "Command1",
258+
"OLEDropMode": "vbOLEDropNone",
259+
"Padding": 2,
260+
"Picture": "",
261+
"PictureAlignment": "vbAlignTop",
262+
"PictureDpiScaling": false,
263+
"RightToLeft": false,
264+
"Style": "vbButtonStandard",
265+
"TabIndex": 3,
266+
"TabStop": true,
267+
"Tag": null,
268+
"ToolTipText": null,
269+
"Top": 1,
270+
"UseMaskColor": false,
271+
"Visible": true,
272+
"VisualStyles": true,
273+
"WhatsThisHelpID": 0,
274+
"Width": 110,
275+
"_className": "CommandButton",
276+
"_clsid": "{33AD4EF0-6699-11CF-B70C-00AA0060D393}"
277+
}
278+
],
279+
"_className": "Form",
280+
"_clsid": "{33AD4F38-6699-11CF-B70C-00AA0060D393}",
281+
"hDC": 124091
282+
}
283+
]

ShellTreeDemo.twin

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[ Description ("") ]
2+
[ FormDesignerId ("66B02E82-E553-4CBF-BFBE-BDD5AB49C2E8") ]
3+
[ PredeclaredId ]
4+
Class ShellTreeDemo
5+
6+
Private Sub Form_Resize() Handles Form.Resize
7+
ucShellTree1.Width = Me.ScaleWidth - 10
8+
ucShellTree1.Height = Me.ScaleHeight - 68
9+
End Sub
10+
11+
12+
Private Sub ucShellTree1_ItemSelect(sName As String, sFullPath As String, bFolder As Boolean, hItem As LongPtr) Handles ucShellTree1.ItemSelect
13+
Label1.Caption = "Selected: " & sName & " (" & sFullPath & ")"
14+
End Sub
15+
16+
Private Sub Command1_Click() Handles Command1.Click
17+
ucShellTree1.OpenToPath "C:\Windows", False
18+
End Sub
19+
20+
Private Sub Form_Load() Handles Form.Load
21+
'ucShellTree1.Checkboxes = True
22+
End Sub
23+
24+
25+
End Class

ucShellTree.twin

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
Public Class ucShellTree
77
Option Explicit
88

9-
Private Const mVersionStr As String = "Shell Tree Control 2.9"
9+
Private Const mVersionStr As String = "Shell Tree Control 2.9.1"
1010
#Region "README"
1111
''*********************************************************************************************
1212
'
1313
'ucShellTree.twin
14-
'Shell Tree Control v2.9 - twinBASIC Implementation
14+
'Shell Tree Control v2.9.1 - twinBASIC Implementation
1515
'
1616
'Author: fafalone
1717
'(c) 2018-2023
@@ -64,6 +64,15 @@ Private Const mVersionStr As String = "Shell Tree Control 2.9"
6464
'
6565
'---------------------------------------CHANGELOG----------------------------------------
6666
'
67+
'v2.9.1 (Released Jan 27th, 2024)
68+
'-(Bug fix) AutoCheck = False not respected when expanding a checked folder (thanks to
69+
' VBForums user Mith for report and fix)
70+
'-(Bug fix) When AutoCheck = False and CheckBoxes = True is set at runtime, checkboxes
71+
' improperly cycled through partial checks. This is currently fixed as a work-
72+
' around that will not work properly if ExclusionChecks = True (and AutoCheck
73+
' = False), but it may be some time before I Can run down a proper fix.
74+
'
75+
'
6776
'v2.9 (Release Jan 15th, 2024)
6877
'-Now using a mirrored image list to support arbitrary icon size.
6978
'
@@ -6704,8 +6713,9 @@ If (siParent Is Nothing) = False Then
67046713
TreeView_SetCheckStateEx hTVD, hitemPrev, 0
67056714
Else
67066715
If TreeView_GetCheckState(hTVD, hitemParent) = 2 Then
6707-
TreeView_SetCheckState hTVD, hitemPrev, 1
6708-
' TreeView_SetItemState hTVD, hitemPrev, IndexToStateImageMask(3), TVIS_STATEIMAGEMASK
6716+
If mAutocheck = True Then
6717+
TreeView_SetCheckState hTVD, hitemPrev, 1
6718+
End If
67096719
End If
67106720
End If
67116721
If fDisable Then
@@ -8584,8 +8594,12 @@ Select Case uMsg
85848594
End If
85858595
ElseIf ((nmtvic.uStateNew And TVIS_STATEIMAGEMASK) = &H3000) And (mAutocheck = False) Then
85868596
DebugAppend "ItemExclude"
8587-
TVEntries(nmtvic.lParam).Checked = False
8588-
TVEntries(nmtvic.lParam).Excluded = True
8597+
If mExCheckboxes Then
8598+
TVEntries(nmtvic.lParam).Checked = False
8599+
TVEntries(nmtvic.lParam).Excluded = True
8600+
Else
8601+
SetTVItemStateImage nmtvic.hItem, tvcsEmpty
8602+
End If
85898603
ElseIf (nmtvic.uStateNew And TVIS_STATEIMAGEMASK) = &H4000 Then
85908604
TVEntries(nmtvic.lParam).Checked = False
85918605
TVEntries(nmtvic.lParam).Excluded = True

0 commit comments

Comments
 (0)