Search found 14133 matches

by jvierra
Sat Feb 15, 2020 2:43 pm
Forum: PowerShell GUIs
Topic: Minimize Form auto closes Child
Replies: 9
Views: 115

Re: Minimize Form auto closes Child

Yes. That is a limitation of modal dialogs. Both the main form and the child are modal dialogs. If a form and child are shown and they have a parent child relation then minimizing the main form will minimize the child but minimizing the child will never minimize the parent. This is by design. The on...
by jvierra
Fri Feb 14, 2020 7:42 am
Forum: PowerShell GUIs
Topic: DataGridView - Column Text Alignment Issue
Replies: 8
Views: 131

Re: DataGridView - Column Text Alignment Issue

Columns do not sort automatically. If you design the grid to to set the column to NotSortable in the designer then they won't be clickable. If you load the grid from a DataTable then try to disable the mode it will cause the columns to be reset because they are being "de-buttoned" but it will cause ...
by jvierra
Fri Feb 14, 2020 5:53 am
Forum: PowerShell GUIs
Topic: DataGridView - Column Text Alignment Issue
Replies: 8
Views: 131

Re: DataGridView - Column Text Alignment Issue

That doesn't "unsort" data. There is no way to "unsort" data. That just tells the grid how it will be sorted. If you choose "Automatic" then the grid will be sorted on that column. If the grid is already loaded it will not be changed when you change the value. To autosort you need to use a DataTable...
by jvierra
Fri Feb 14, 2020 5:28 am
Forum: PowerShell GUIs
Topic: DataGridView - Column Text Alignment Issue
Replies: 8
Views: 131

Re: DataGridView - Column Text Alignment Issue

iamtj69 wrote:
Fri Feb 14, 2020 5:22 am
Does something similar apply for disabling "sort". This is something else i have been struggling with. How can i disable 'sort' for an entire grid?
There is no sort for a grid. The data displays however it is loaded.
by jvierra
Fri Feb 14, 2020 5:26 am
Forum: PowerShell GUIs
Topic: DataGridView - Column Text Alignment Issue
Replies: 8
Views: 131

Re: DataGridView - Column Text Alignment Issue

Your issue seems to be because you are trying to change the style after the grid has been loaded. Set teh style for the cells only before the grid is loaded and displayed. You can also probably do this after the grid is loaded by creating a new style object and adding assigning it to the DefaultCell...
by jvierra
Fri Feb 14, 2020 4:09 am
Forum: PowerShell GUIs
Topic: DataGridView - Column Text Alignment Issue
Replies: 8
Views: 131

Re: DataGridView - Column Text Alignment Issue

You cannot set that on individual columns. You can only set the global column alignment for all columns. Because the style object is set by type the properties of the style object appear when you look but they are inherited from the global template and cannot be set. The property does not exist on i...
by jvierra
Thu Feb 13, 2020 11:48 am
Forum: PowerShell GUIs
Topic: Redirect Process Output - Dism - ProgressBar
Replies: 6
Views: 123

Re: Redirect Process Output - Dism - ProgressBar

Then you can just do this:

Code: Select all

$s = '[===========================78.1%=============             ]'
if($s -match '(\d+)'){[int]$matches[1]}
by jvierra
Thu Feb 13, 2020 11:29 am
Forum: PowerShell GUIs
Topic: Redirect Process Output - Dism - ProgressBar
Replies: 6
Views: 123

Re: Redirect Process Output - Dism - ProgressBar

You need to use a proper RegEx. The RegEx you are using is removing the decimal point.

Example:

Code: Select all

if('[===========================78.1%=============             ]' -match '(\d+.\d+)'){$matches[1]}
by jvierra
Thu Feb 13, 2020 9:56 am
Forum: PowerShell GUIs
Topic: Redirect Process Output - Dism - ProgressBar
Replies: 6
Views: 123

Re: Redirect Process Output - Dism - ProgressBar

What have you tried?
by jvierra
Thu Feb 13, 2020 9:15 am
Forum: PowerShell GUIs
Topic: How to multicolumn listbox
Replies: 2
Views: 191

Re: How to multicolumn listbox

There is no need. A multicolumn ListBox just draws the list in multiple columns that are set by the width of the ListBox and the column width specified..