PSEC - Powershell Enhanced Capability
Version 1.2.1

Grid Class extends Gizmo (src: gui-classes.psm1)

Description

Implementation of the Windows.Forms.DataGridView

Details

This implementation extends the Windows.Forms.DataGridView implemtation with many formatting and handling functions (methods).


Public Fields

FieldFormatDescription
$ctx[Object] click context

Method Index

staticaddCols Add a set of column headers

staticaddMouseHooks TODO - find out what thi does

staticaddRow TODO - find out what thi does

staticaddRow TODO - find out what thi does

staticaddRow TODO - find out what thi does

staticcalcGridSize Calculates the optimal Grid size

staticcalcGridSize not-described

cellClick TODO - find out what thi does

cellEnter TODO - find out what thi does

cellLeave TODO - find out what thi does

staticcreateGrid TODO - find out what thi does

focusRow Sets a mode where rows are focused, not cells using the supplied background color

getGizmoWidth The grid width is more dynamic so we always use the peer size ubnless it ever become $peerW non-zero.

staticgetLastRow TODO - find out what thi does

setRowAsFocused Programatically sets a row as focused


addCols Method index (src: gui-classes.psm1)

Signature

static [void] addCols ( [Windows.Forms.DataGridView]$dgv, [string]$colStr)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

$colStr string parm description missing

Description

Add a set of column headers

Details

Calculates the optimal Grid size by inspecting the row and column counts.

Notes

These static methods are used before the dgv is hooked to the Grid class wrapper

addMouseHooks Method index (src: gui-classes.psm1)

Signature

static [void] addMouseHooks ( [Windows.Forms.DataGridView]$dgv)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

Description

TODO - find out what thi does

Details


addRow Method index (src: gui-classes.psm1)

Signature

static [void] addRow ( [Windows.Forms.DataGridView]$dgv, [System.Object]$col1, [System.Object]$col2)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

$col1 System.Object parm description missing

$col2 System.Object parm description missing

Description

TODO - find out what thi does

Details


addRow Method index (src: gui-classes.psm1)

Signature

static [void] addRow ( [Windows.Forms.DataGridView]$dgv, [System.Object]$col1, [System.Object]$col2, [string]$hint)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

$col1 System.Object parm description missing

$col2 System.Object parm description missing

$hint string parm description missing

Description

TODO - find out what thi does

Details


addRow Method index (src: gui-classes.psm1)

Signature

static [Windows.Forms.DataGridViewRow] addRow ( [Windows.Forms.DataGridView]$dgv)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

Description

TODO - find out what thi does

Details


calcGridSize Method index (src: gui-classes.psm1)

Signature

static [string] calcGridSize ( [Windows.Forms.DataGridView]$dgv, [int]$maxRows)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

$maxRows int parm description missing

Description

Calculates the optimal Grid size

Details

Calculates the optimal Grid size by inspecting the row and column counts.

Notes

These static methods are used before the dgv is hooked to the Grid class wrapper

calcGridSize Method index (src: gui-classes.psm1)

Signature

static [string] calcGridSize ( [Windows.Forms.DataGridView]$dgv)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

Empty

markdown text missing


cellClick Method index (src: gui-classes.psm1)

Signature

[void] cellClick ( [any]$ri, [any]$ci)

Parameters

Parameter Format Description

$ri any parm description missing

$ci any parm description missing

Description

TODO - find out what thi does

Details


cellEnter Method index (src: gui-classes.psm1)

Signature

[void] cellEnter ( [any]$ri, [any]$ci)

Parameters

Parameter Format Description

$ri any parm description missing

$ci any parm description missing

Description

TODO - find out what thi does

Details


cellLeave Method index (src: gui-classes.psm1)

Signature

[void] cellLeave ( [any]$ri, [any]$ci)

Parameters

Parameter Format Description

$ri any parm description missing

$ci any parm description missing

Description

TODO - find out what thi does

Details


createGrid Method index (src: gui-classes.psm1)

Signature

static [Grid] createGrid ( [Area]$par, [string]$size, [string]$locn, [scriptBlock]$formatter, [System.Object]$ctx)

Parameters

Parameter Format Description

$par Area Parent panel (container)

$size string parm description missing

$locn string parm description missing

$formatter scriptBlock parm description missing

$ctx System.Object parm description missing

Description

TODO - find out what thi does

Details


focusRow Method index (src: gui-classes.psm1)

Signature

[Grid] focusRow ( [string]$bg, [ScriptBlock]$func)

Parameters

Parameter Format Description

$bg string parm description missing

$func ScriptBlock parm description missing

Description

Sets a mode where rows are focused, not cells using the supplied background color

Details

Requires that we set the clearSelection just prior to row painting.


getGizmoWidth Method index (src: gui-classes.psm1)

Signature

[int32] getGizmoWidth ()

Description

The grid width is more dynamic so we always use the peer size ubnless it ever become $peerW non-zero.


getLastRow Method index (src: gui-classes.psm1)

Signature

static [Windows.Forms.DataGridViewRow] getLastRow ( [Windows.Forms.DataGridView]$dgv)

Parameters

Parameter Format Description

$dgv Windows.Forms.DataGridView subject DataGridView

Description

TODO - find out what thi does

Details


setRowAsFocused Method index (src: gui-classes.psm1)

Signature

[void] setRowAsFocused ( [int]$rownum)

Parameters

Parameter Format Description

$rownum int parm description missing

Description

Programatically sets a row as focused

Details

Assumed focusRow is enabled

Notes

using $rownum = -1 will turn of focused rows

PSEC - Powershell Enhanced Capability
1.2.1

Copyright © 2018-2021, 2022, Rexcel System Inc.

 

 

 

 

 

X