Modify

Opened 11 years ago

Closed 11 years ago

#2379 closed Bug (Duplicate)

WS_EX_LAYOUTRTL and GUICtrlCreateMenu causes bug

Reported by: Emiel Wieldraaijer Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: WS_EX_LAYOUTRTL Cc:

Description

Hi,

I reported this bug 16 months ago (Ticket 2167) but Jon rejected the bug like many others two weeks ago..

If you run the code below in version 3.3.8.1 and even in the latest 3.3.9.15.. it produces attached file example1.png. If you remove the line $Menu = GUICtrlCreateMenu("help") from the example the problem does not exist.. if you place GUISetState() after GUICreate it produces attached file example2.png .. it looks good but it does not show the button on the first tab .. only after switching the tab.. the button will be visible again..

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; *** Start added by AutoIt3Wrapper ***
;http://www.autoitscript.com/forum/topic/139094-ws-ex-layoutrtl-bug-or-no-bug/

#include <UpDownConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Parent = GuiCreate ("Test", 400, 400, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX), $WS_EX_LAYOUTRTL)

$Menu = GUICtrlCreateMenu("help")
$Tab = GUICtrlCreateTab(10, 10, 350, 300)
$Tab1 = GUICtrlCreateTabItem("Tab1")
$Restart = GuictrlCreateButton("Restart", 200,100,150,20)
$Tab2 = GUICtrlCreateTabItem("Tab2")
$Port = GUICtrlCreateInput("21", 200, 200, 150, 20)
$PortUPDown = GUICtrlCreateUpdown($Port, BitOR($UDS_NOTHOUSANDS, $UDS_WRAP))
$Tab3 = GUICtrlCreateTabItem("Tab3")
GUISetState()

While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit
If $msg = $Restart Then
  Run('"' & @AutoItExe & '"' & ' /AutoIt3ExecuteScript "' & @ScriptFullPath & '" /restart')
  Exit
EndIf
WEnd

Attachments (2)

Example1.png (3.2 KB) - added by Emiel Wieldraaijer 11 years ago.
Example2.png (4.2 KB) - added by Emiel Wieldraaijer 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by Emiel Wieldraaijer

Changed 11 years ago by Emiel Wieldraaijer

comment:1 Changed 11 years ago by BrewManNH

If you move the CreateMenu item to the end of the list of things being created, it doesn't cause the problems. Also, you never close the tab item creation by using "GUICtrlCreateTabItem("")" after the last tab item created, which might be causing part of your problem.

comment:2 Changed 11 years ago by Emiel Wieldraaijer

@BrewManNH

You are right i do not use GUICtrlCreateTabItem("") .. never used it .. and it's mentioned in the help files .. it solves the problem of the missing button..
Indeed the menu item at the end of the script solves the problem .. but it's still a bug. the code or the help files should change..

Thanks

comment:3 Changed 11 years ago by Emiel Wieldraaijer

forgot to mention it .. but this problems did not occur in version 3.3.6.1

comment:4 Changed 11 years ago by Jpm

  • Resolution set to Duplicate
  • Status changed from new to closed

Now 2167 is fixed
Cheers

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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.