PowerShell In GUI Blog

PowerShell GUI Box Just In A Few Clicks

Archive for the ‘System.Windows.Forms.ImageList’ Category

Which Icons Are Shipped With Object Browser?

leave a comment »

Actually, what is the easiest way to display icons? Create a control like ListView? Maybe. Let’s create a handful of windows, just to observe how short the code might be.

First, import both modules, SuiteCore and ObjectBrowser (here and thereafter the PSDevStudioLite modules set is in use).

After that you are able to use the function set shipped with the package. The following simple code creates windows, which in turn demostrate icons.

function createWindows
    for($private:i = 0; $private:i -lt $imagesList.Count; $private:i++)
        $tw2 = New-SEToolWindow -Control (([System.Windows.Forms.ListBox]$lb = New-Object System.Windows.Forms.ListBox) | %{$lb;}) `
            -TitleBarText ("aaa" + $private:i) `
            -WindowName ("aaaaa" + $private:i) `
            -Image $imagesList[$imagesList.Keys[$private:i]] `
            -Visible $false -State TabbedDocument;
        Write-Host $private:i $imagesList.Keys[$private:i]
        $se.ToolWindows[("aaaaa" + $private:i)].Visible = $true;


In the GUI you might easily see all of them by clicking a triangle, allowing you to make a list of all open documents:

To clean up the document list is also simply, even somewhat simpler that to fill up:

function removeWindows
for($private:i = 0; $private:i -lt $imagesList.Count; $private:i++)
Remove-SEToolWindow -WindowName ("aaaaa" + $private:i);



Requirements: PSDevStudioLite.SuiteCore Beta and higher, PSDevStudioLite.ObjetBrowser Beta ang higher.


Note: all above are never be supported by quest, wasn’t and won’t be.