I have an application for video editing/viewing which I started back around
2019.
I use it daily and have improved it over time to streamline its use.

Now I have run into a problem concerning the display of TCheckbox objects:

I have used regular buttons in the past for two parameter setting/activation
functions but changed to use TCheckBox because then I can then show the state of
the parameter (active/inactive) as well as its value.

So when I click the checkbox active there is a checkmark shown so I see its
active state.
When activating the parameter I write the new value (integer) to the end of the
caption so the value is shown.
I have set the Autosize property to True so the control resizes to fit the new
longer text.

This works fine on Windows but when I build the project on Linux (Ubuntu Server
24.04 with the MATE desktop added) it worked fine before I did the switch to use
TCheckBox rather than TButton controls.

On Windows the control expands in size to show the paramater added after the
function text (which is always shown).
But on Linux it does not expand enough to show the complete text, only the first
digit of the number is visible.
So it does try but fails to get it right (too small)...


It seems like Lazarus/FPC is unable to figure out the correct size to use for
the control in the Autosize operation....

How can I correct this such that it expands fully to show the added text like it
does on Windows? Is there a command I can use at the end of the code that runs
when the checkbox is clicked and the caption is modified to force it to show the
full text?

My devtool versions are :
FPC:     3.2.2
Lazarus: 4.2
OS: Windows 11 / Ubuntu 24.04 Server + MATE desktop

The project is the same on both Linux and Windows, I use Subversion to keep the
versions on both platforms the same.

I have a function that runs on startup if on UNIX (ifdef-ed) which modifies some
parameters which differ between the operating systems.

I could add something there if needed but I don't know what to use in order to
make these controls behave.

TIA

-- 
Bo Berglund
Developer in Sweden

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to