#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)
Change History (8)
Changed 12 years ago by jfregin@…
comment:1 Changed 11 years ago by Jon
- Resolution set to Rejected
- Status changed from new to closed
comment:2 Changed 11 years ago by Jpm
- Resolution Rejected deleted
- Status changed from closed to reopened
comment:3 Changed 11 years ago by Jon
- Milestone set to 3.3.9.21
- Owner set to Jon
- Resolution set to Fixed
- Status changed from reopened to closed
Fixed by revision [8991] in version: 3.3.9.21
comment:4 Changed 10 years ago by AlanParry
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 Changed 10 years ago by AlanParry
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 Changed 10 years ago by BrewManNH
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.
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.
Bug occured is the button is colored ...