Ticket #2299: ButtonTextLeftJustifyBug.au3

File ButtonTextLeftJustifyBug.au3, 1.1 KB (added by jfregin@…, on Jan 13, 2013 at 10:36:50 AM)
Line 
1#include <GUIConstantsEx.au3>
2#include <WindowsConstants.au3>
3#include <ButtonConstants.au3>
4
5_Main()
6
7Func _Main()
8 Local $msg, $button1, $button2, $button3
9 #forceref $separator1
10
11 GUICreate("", 1000, 600, 0, 0, BitOR($WS_MAXIMIZE, $WS_POPUP))
12 GUISetBkColor(0x000000)
13
14 GUICtrlSetDefBkColor(0x000000)
15 GUICtrlSetDefColor(0xFFFFFF)
16 GUISetFont (15, 500)
17
18 $button1 = GUICtrlCreateButton("This button should have a black background with white text.", 40, 120, 800)
19 GUICtrlSetStyle ( $button1, $BS_LEFT )
20
21 Opt("GUICoordMode", 2) ;1=absolute, 0=relative, 2=cell
22
23 $button2 = GUICtrlCreateButton("This button should have left-justified text.", -1, 15, -1, -1, $BS_LEFT)
24
25 $button3 = GUICtrlCreateButton("This button should also have left-justified text.", -1, 15)
26 GUICtrlSetStyle ( $button3, $BS_LEFT )
27 GUICtrlSetBkColor($button3, 0x000000)
28 GUICtrlSetColor($button3, 0xFFFFFF)
29
30 GUISetState()
31 $msg = 0
32
33 While $msg <> $GUI_EVENT_CLOSE
34 $msg = GUIGetMsg()
35
36 Select
37
38 Case $msg = $button1 or $msg = $button2 or $msg = $button3
39 ExitLoop
40
41 EndSelect
42 WEnd
43
44 GUIDelete()
45
46 Exit
47EndFunc ;==>_Main