TStatusBar, cannot set alignment lazarus / 31-LCL ---------------------------------------------------------------------- Tony Stone · 2022-02-15 18:31 I am trying to figure out why I cannot set the alignment of panels in my status bar.  I can set it on the end panels but none of my middle panels.  Is this a bug? Thanks for any input.  Lazarus 2.2.0 (rev lazarus_2_2_0-81-gbbac02ab05) FPC 3.2.3 x86_64-linux-gtk2 ---------------------------------------------------------------------- dsiders · 2022-02-15 21:21 Quote from: Tony Stone on February 15, 2022, 07:31:31 pmI am trying to figure out why I cannot set the alignment of panels in my status bar.  I can set it on the end panels but none of my middle panels.  Is this a bug? Thanks for any input.  Lazarus 2.2.0 (rev lazarus_2_2_0-81-gbbac02ab05) FPC 3.2.3 x86_64-linux-gtk2 Works as expected on Windows. See attached. Did you set the width for the panels to value large enough that alignment can be applied? ---------------------------------------------------------------------- Tony Stone · 2022-02-15 23:03 I personally have no tried on Windows.  But yes, I am setting the width to the text width + about 10 pixels.  ANNNNNNDDDD as I typed that I now wonder if I am improperly taking form width into account.  I will check my code. HOWEVER.... even when i set the widths and alignment at design time in a simple demo then run it the text is not being aligned.  May be that GTK doesn't support it?  Although it works on my first and last panel.  hmmmm. Quote from: dsiders on February 15, 2022, 10:21:16 pmQuote from: Tony Stone on February 15, 2022, 07:31:31 pmI am trying to figure out why I cannot set the alignment of panels in my status bar.  I can set it on the end panels but none of my middle panels.  Is this a bug? Thanks for any input.  Lazarus 2.2.0 (rev lazarus_2_2_0-81-gbbac02ab05) FPC 3.2.3 x86_64-linux-gtk2 Works as expected on Windows. See attached. Did you set the width for the panels to value large enough that alignment can be applied? ---------------------------------------------------------------------- dsiders · 2022-02-16 00:09 Quote from: Tony Stone on February 16, 2022, 12:03:53 am...as I typed that I now wonder if I am improperly taking form width into account.  I will check my code. Bear in mind that the font on the status bar is the System font, and its text metrics may differ from the form font. Quote from: Tony Stone on February 16, 2022, 12:03:53 amHOWEVER.... even when i set the widths and alignment at design time in a simple demo then run it the text is not being aligned.  May be that GTK doesn't support it?  Although it works on my first and last panel.  hmmmm. In that case, you should file a bug report. Include info about your Linux distro and desktop environment though. ---------------------------------------------------------------------- howardpc · 2022-02-16 07:02 Most likely there is a bug in your code, which you have not shown. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i StatusBar.Panels[x].Alignmentworks as expected here using gtk2. ---------------------------------------------------------------------- Tony Stone · 2022-02-22 21:43 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MainStatBar.Panels[2].Alignment := taCenter; Not sure there would be anything else to even try..... ??? Thanks Quote from: howardpc on February 16, 2022, 08:02:41 amMost likely there is a bug in your code, which you have not shown. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i StatusBar.Panels[x].Alignmentworks as expected here using gtk2.