Opened 9 years ago

Closed 9 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: Component: AutoIt
Version: Severity: None
Keywords: _GUICtrlStatusBar_Create Cc:


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] = ""

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, and

Alan Parry

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by Melba23

  • Milestone set to
  • Owner set to Melba23
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [11154] in version:

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.

Add Comment

Modify Ticket

as closed The owner will remain Melba23.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.