Jump to content

There may be a bug in _GUICtrlStatusBar_Create


Recommended Posts

autoit v3.3.10.2

this code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region
Local $Form1 = GUICreate("Form1", 300, 200)
Local $MenuItem1 = GUICtrlCreateMenu("MenuItem1")
Local $MenuItem2 = GUICtrlCreateMenuItem("MenuItem2", $MenuItem1)
Local $MenuItem3 = GUICtrlCreateMenuItem("MenuItem3", $MenuItem1)
Local $MenuItem4 = GUICtrlCreateMenu("MenuItem4")
Local $MenuItem5 = GUICtrlCreateMenuItem("MenuItem5", $MenuItem4)

Local $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
Local $StatusBar1_PartsWidth[2] = [260, -1]
_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)
_GUICtrlStatusBar_SetText($StatusBar1, "Text1", 0)
_GUICtrlStatusBar_SetText($StatusBar1, "Text2", 1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 17)

GUISetState(@SW_SHOW)
#EndRegion

Local $nMsg
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

run:

post-84231-0-20333300-1395746102_thumb.j

so ,where is the StatusBar??

but this code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region
Local $Form1 = GUICreate("Form1", 300, 200)
Local $MenuItem1 = GUICtrlCreateMenu("MenuItem1")
Local $MenuItem2 = GUICtrlCreateMenuItem("MenuItem2", $MenuItem1)
GUICtrlSetState(-1, $GUI_FOCUS)
Local $MenuItem3 = GUICtrlCreateMenuItem("MenuItem3", $MenuItem1)
Local $MenuItem4 = GUICtrlCreateMenu("MenuItem4")
Local $MenuItem5 = GUICtrlCreateMenuItem("MenuItem5", $MenuItem4)

Local $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
Local $StatusBar1_PartsWidth[2] = [260, -1]
_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)
_GUICtrlStatusBar_SetText($StatusBar1, "Text1", 0)
_GUICtrlStatusBar_SetText($StatusBar1, "Text2", 1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 17)

GUISetState(@SW_SHOW)
#EndRegion

Local $nMsg
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

run:

post-84231-0-88180800-1395746104_thumb.j

StatusBar appeared !!

is this a bug of _GUICtrlStatusBar_Create?

Edited by Skyfree
Link to comment
Share on other sites

  • Moderators

Skyfree,

Yes.  Although not quite the same thing, I reported a similar problem at #2588.  I will add a link to this thread as well. :)

 

M23

Edit: Ticket amended. :)

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...