Form Caption [Text Size Adjustment] lazarus / 21-General ---------------------------------------------------------------------- Aruna · 2024-08-16 17:18 Is it possible to adjust the font size and style of the 'Caption' in a Form? The first attachment shows how the form's caption currently appears. The second attachment displays a button with the same caption text but in a much smaller font size. I want the form's caption text to match the appearance of the button text exactly. Can this be accomplished using the form's caption property? ---------------------------------------------------------------------- MarkMLl · 2024-08-16 17:27 Depends on the OS. On unix/X11 that sort of thing is the business of the window manager since everything outside the application area is "furniture" managed by the OS (term used loosely), so even if the application code had access to an API which professed to change that sort of property what actually happened might vary enormously. MarkMLl ---------------------------------------------------------------------- Aruna · 2024-08-16 18:58 Quote from: MarkMLl on August 16, 2024, 07:27:26 pmDepends on the OS. On unix/X11 that sort of thing is the business of the window manager since everything outside the application area is "furniture" managed by the OS (term used loosely), so even if the application code had access to an API which professed to change that sort of property what actually happened might vary enormously. MarkMLl So, even if we override the caption property, the window manager or operating system may ultimately dictate how the caption is displayed? I figured out a fix of sorts. Changed the FOrms BorderStyle property from bsSizeable to bsNone then took a label and did this: 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 procedure ChangeCaptionToLabelForm1.Button7Click(Sender: TObject);begin   // Set the label size and position to match your form's caption area  Label1.Left := 0;  Label1.Top := 0;  Label1.Width := ClientWidth;  Label1.Height := 30; // Adjust as neededend;                                       EDIT: This works! But now I am unable to move(drag) the form lol ---------------------------------------------------------------------- MarkMLl · 2024-08-16 19:57 "The proof was valid, more or less, "Though rather less than more." :-) Depending on the WM- and you STILL haven't told us what you're running- there might be a way to set it on a per-app basis (KDE, as an example, can do that). But you risk getting yourself into a gawdalmighty mess if the WM (assuming unix/X11) and LCL start reacting to any DPI etc. changes in different ways, and I don't know whether there's a way of distributing the setup information (again assuming unix/X11, I don't think there's anything relevant in the .desktop file standard). MarkMLl ---------------------------------------------------------------------- Aruna · 2024-08-17 02:12 Quote from: MarkMLl on August 16, 2024, 09:57:33 pm"The proof was valid, more or less, "Though rather less than more." :-)"Ah, a balanced critique. It seems there's always room to aim for 'more' in the quest for 'more or less' perfection. Thanks for the insight!" :-) (A. E. Housman's poem "The Proof." ?) Quote from: MarkMLl on August 16, 2024, 09:57:33 pmDepending on the WM- and you STILL haven't told us what you're running- there might be a way to set it on a per-app basis (KDE, as an example, can do that). But you risk getting yourself into a gawdalmighty mess if the WM (assuming unix/X11) and LCL start reacting to any DPI etc. changes in different ways, and I don't know whether there's a way of distributing the setup information (again assuming unix/X11, I don't think there's anything relevant in the .desktop file standard). I am running: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Linux version 6.4.8-usb (root@debian) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #8 SMP PREEMPT_DYNAMIC Fri Feb  9 17:21:43 EST 2024The Desktop Environment is Gnome. Window Manager I believe is Mutter. (So yes *nix/X11) and my Lazarus + FPC setup you can see in the attached screenshot. ( I did get into a Gawd almighty mess a couple of days ago because of my meddling with the splash logo )