Jump to content

Recommended Posts

Posted (edited)

I have a Treeview with icons. Sample code:

$cItem = GUICtrlCreateTreeViewItem('Network',$cTV)
            GUICtrlSetImage($cItem,'shell32.dll',-(17+1),4)
            ; add blank item so know no children; also cause [+] to show
            $cTempItem = GUICtrlCreateTreeViewItem("", $cItem)

Following Melba23, the "" item only exists initially -- until user expands Network.

When the user clicks on the [+], in the message loop, the "" item is replaced by items whose text is the names of PCs on the network.

The problem is that, because other items have icons, the "" shows with an icon. It should not.

How do I get rid of the icon beside the "" item?

I have tried putting GuiCtrlSetState($cTempItem,$GUI_HIDE)

The same thing happens when a PC item is expanded to show shareable drives.  In this case, the expansion must happen in the message loop, for speed to be acceptable.

My script, an extension of Melba23's ChoosFileFinder, simulates FileFindFolder, and can be positioned on the screen (and in the future, may be able to be embedded in a dialog).

Edited by c.haslam
Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

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
×
×
  • Create New...