Bugzilla – Bug 402165
Text is not displayed on StatusBarPanel with Center alignment
Last modified: 2008-06-25 17:32:18 UTC
As I see text is not displayed on StatusBarPanel when StatusBarPanel.Alignment = HorizontalAlignment.Center. There is no problems showing text with other alignment values.
Fixed in r106472. Thanks for the report! 2008-06-23 Jonathan Pobst <monkey@jpobst.com> * ThemeWin32Classic.cs: Fix position calculation for centered text on status bar panels. [Fixes bug #402165]
The problem still occur when it's not the first panel that has center alignment. See the screenshot where I've also had the code draw a rectangle around the string_rect bounds. The repro app is attached. Seems the line needs to be: x = area.Left + ((panel.Width - len) / 2); Two other things are apparent in testing: 1) With text longer than the panel size the start of the text is not displayed in right/center alignment. That's ok it matches MSFT. 2) Only the first panel is refreshed -> bug 403599
Created attachment 224207 [details] Screenshot
Created attachment 224208 [details] Repro app
I can't see how this blocks bug #402172 (ImageAttributes.GetAdjustedPalette) ? typo ? anyway I removed the association.
Ah, nice followup. Thanks! Fixed in r106585. 2008-06-25 Jonathan Pobst <monkey@jpobst.com> * ThemeWin32Classic.cs: Fix from Andy for panel text for panels that are not the first panel. * StatusBar.cs: Ensure that the X coordinate of panels is always stored. Fix IList implementation of StatusBarPanelCollection to call the regular methods. [Fixes bug #403599, #402165]