Opened 10 years ago
Closed 10 years ago
#2939 closed Bug (Fixed)
_GUICtrlStatusBar_Create zeros part widths when PartWidth array given but PartText not same size array
Reported by: | anonymous | Owned by: | Melba23 |
---|---|---|---|
Milestone: | 3.3.13.20 | Component: | AutoIt |
Version: | 3.3.12.0 | Severity: | None |
Keywords: | _GUICtrlStatusBar_Create | Cc: |
Description
If _GUICtrlStatusBar_Create is called with an array of $vPartWidth but $vPartText is either "" or a smaller array, then the PartWidths are incorrectly set to "" (so treated as 0)
This is most likely to be seen when the caller does not wish to set any $vPartText but wishes to set the styles. Calling the function with the given $vPartsText default of "" and a style results in all parts being created with width of 0.
This is the part of the code in GuiStatusBar.au3 with the problem
; if partwidth array is not same size as parttext array use larger sized array for size If UBound($aPartWidth) <> UBound($aPartText) Then Local $iLast If UBound($aPartWidth) > UBound($aPartText) Then ; width array is larger $iLast = UBound($aPartText) ReDim $aPartText[UBound($aPartWidth)] For $x = $iLast To UBound($aPartText) - 1 $aPartWidth[$x] = "" Next
The $aPartWidth[$x] = "" should be $aPartText[$x] = "".
(actually the whole loop is redundant as the redim has cleared the extra $aPartText elements anyway.)
This issue exists in 3.3.8.1, 3.3.12.0 and 3.3.13.19.
Regards
Alan Parry
Attachments (0)
Change History (1)
comment:1 Changed 10 years ago by Melba23
- Milestone set to 3.3.13.20
- Owner set to Melba23
- Resolution set to Fixed
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Fixed by revision [11154] in version: 3.3.13.20