Opened on Mar 7, 2016 at 6:03:30 PM
#3213 closed Feature Request (Rejected)
_Arraydisplay() (from Array.au3) may truncate headers since their max widths are unchecked
| Reported by: | Tippex | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | Standard UDFs | |
| Version: | Severity: | None | |
| Keywords: | _ArrayDisplay, Headers, Truncated | Cc: |
Description
_Arraydisplay() (from Array.au3) may truncate headers (if there are any that are larger that then max width of their columns) since their max widths are unchecked.
The fix I use (an amendment to Array.au3) is as follows:
#include "ListViewConstants.au3" ; Check width of header if set If $sHeader <> "" Then GUICtrlSendMsg($idListView, $_ARRAYCONSTANT_LVM_SETCOLUMNWIDTH, $i, $LVSCW_AUTOSIZE_USEHEADER) Local $iColWidthHeader = GUICtrlSendMsg($idListView, $_ARRAYCONSTANT_LVM_GETCOLUMNWIDTH, $i, 0) EndIf ; Set minimum if required If $iColWidth < $iMin_ColWidth And $iColWidthHeader < $iMin_ColWidth Then GUICtrlSendMsg($idListView, $_ARRAYCONSTANT_LVM_SETCOLUMNWIDTH, $i, $iMin_ColWidth) $iColWidth = $iMin_ColWidth ElseIf $iColWidthHeader < $iColWidth Then GUICtrlSendMsg($idListView, $_ARRAYCONSTANT_LVM_SETCOLUMNWIDTH, $i, $iColWidth) Else $iColWidth = $iColWidthHeader EndIf
to replace the following in Func _ArrayDisplay:
; Set minimum if required If $iColWidth < $iMin_ColWidth Then GUICtrlSendMsg($idListView, $_ARRAYCONSTANT_LVM_SETCOLUMNWIDTH, $i, $iMin_ColWidth) $iColWidth = $iMin_ColWidth EndIf
Notes:
"ListViewConstants.au3" was included for $LVSCW_AUTOSIZE_USEHEADER
and the original authors & modifiers are:
; Author ........: randallc, Ultima
; Modified.......: Gary Frost (gafrost), Ultima, Zedna, jpm, Melba23, AZJIO, UEZ
Attachments (0)
Change History (4)
comment:2 by , on Mar 8, 2016 at 5:47:57 PM
What would be the benefit gained by this?
_ArrayDisplay is supposed to be a debugging function that, in my opinion, already has far too much added to it so I fail to see how this would add any functionality to debugging an array. You can easily adjust the width of the headers yourself after it has displayed the array.
Considering the function won't even display the full contents of a large array, it's usefulness for anything other than debugging is very limited, this adds nothing that I can see. But I will see how others view it.
comment:3 by , on Mar 8, 2016 at 5:50:00 PM
| Type: | Bug → Feature Request |
|---|---|
| Version: | 3.3.14.0 |
BTW. I would not consider this a bug, I'm recategorizing this as a feature request as there's no bug here.
comment:4 by , on Apr 19, 2016 at 6:24:19 PM
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
The header lengths are determined by the user so it is up to the user to choose suitable header lengths. The UDF is primarily designed to display the array and it would be ridiculous to reduce the visible content just to display a header in full.
Rejected.
M23

_Arraydisplay() (from Array.au3) may truncate headers (if there are any that are larger that then max width of their columns) since their max widths are unchecked.
The fix I use (an amendment to Array.au3) is as follows:
Added to the top section of Array.au3
Then replace (in Func _ArrayDisplay)
From:
To:
Notes:
"ListViewConstants.au3" was included for $LVSCW_AUTOSIZE_USEHEADER
and the original authors & modifiers are:
; Author ........: randallc, Ultima
; Modified.......: Gary Frost (gafrost), Ultima, Zedna, jpm, Melba23, AZJIO, UEZ