Modify

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#2299 closed Bug (Fixed)

GUI Button Text Left-Justify Bug

Reported by: anonymous Owned by: Jon
Milestone: 3.3.9.21 Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: GUI Button Left Justify Cc:

Description

When left-justify button text formatting is set, it changes text color and background to black/white. If either text color or background is set after left-justify, the justify changes to centered. This problem exists in both v3.3.8.1 and v3.3.9.5 (beta).

BTW, thanks for providing this great utility.

The attached file illustrates the left-justify problem.

Attachments (2)

ButtonTextLeftJustifyBug.au3 (1.1 KB ) - added by jfregin@… 13 years ago.
ButtonTextJustify2.au3 (2.6 KB ) - added by anonymous 11 years ago.
New example of issues

Download all attachments as: .zip

Change History (8)

by jfregin@…, 13 years ago

comment:1 by Jon, 13 years ago

Resolution: Rejected
Status: newclosed

comment:2 by J-Paul Mesnage, 13 years ago

Resolution: Rejected
Status: closedreopened

Bug occured is the button is colored ...

comment:3 by Jon, 13 years ago

Milestone: 3.3.9.21
Owner: set to Jon
Resolution: Fixed
Status: reopenedclosed

Fixed by revision [8991] in version: 3.3.9.21

by anonymous, 11 years ago

Attachment: ButtonTextJustify2.au3 added

New example of issues

comment:4 by AlanParry, 11 years ago

Hi,
After upgrading my scripts from 3.3.8.1 to 3.3.12.0/3.3.13.19 it appears that center justification of native buttons has been broken. I guess most likely by the fix for this issue at milestone 3.3.9.21.

The permutations of: default color settings; alignment at creation; style changes; and color changes effect the issue in different ways, and differently now compared to 3.3.8.1.

I have attached a new script (ButtonTextJustify2.au3) that shows the permutations and indicates which permutations have issues.

To try to summarized the issues:-

1) If default colours are used; OR the colours are changed after button creation or style change then:-

a) On 3.3.12.0 and 3.3.13.19 center justification is shown as left, and right as center
b) On 3.3.8.1 left and right were shown as center

2) If style is set/changed when set default colours used, or after colours have been set, then colour settings are lost but justification is correct/fixed.

This second issue was also in the original bug report but seems unaltered by the last bug fix.
(Note also:- Strangely after loosing set default colours with a style change, setting just the background colour restores the foreground colour as well, as can be seen in the last set of examples).

Regards
Alan Parry

comment:5 by AlanParry, 11 years ago

P.S
For the first issue, I wonder if AutoIt's code is being confused by the fact that BS_CENTER = BITOR(BS_LEFT, BS_RIGHT) so you can't just do simple bit tests but need to do:

If BitAnd (style, $BS_CENTER) = $BS_LEFT
If BitAnd (style, $BS_CENTER) = $BS_CENTER
If BitAnd (style, $BS_CENTER) = $BS_RIGHT

(I'm sure the above logic is absolutely obvious to you, but is easily overlooked if not thinking of the actual value of the bits)

Alan Parry

comment:6 by BrewManNH, 11 years ago

Please open a new ticket, this appears to be a different problem. Also post a reproducer script that demonstrates the issue you're talking about.

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.