Forum > Linux

FormStyle = fsStayOnTop, mouse events are not fired from the Dialog Form.


Ubuntu 22.04
Lazarus 2.2.0+dfsg1-5ubuntu1 (rev Debian package 2.2.0+dfsg1-5ubuntu1) FPC 3.2.2 x86_64-linux-gtk2

If the Form has the style FormStyle = fsStayOnTop, then mouse events are not fired over it if it is opened from the Dialog Form.

   Form2 := TForm2.Create(Application);

     Form3.FormStyle = fsStayOnTop

and form Form3 can't be closed at all.

Demo project is attached.
   Run project.
     Click "Create ShowModal Test From"
      Click "New Popup Form"
        Try clicking "Click for test"

I have not tested your source, just read what you wrote.
Modal means, at least that's how I understand it, all other forms shall wait until Modal ends.
Plus the fact that the Modal form has its own event loop to do for what it is made for, be Modal/uninterruptable.
So creating another Form over a Modal Form is a bad idea in my thinking.

In such on the basis of what forms it is necessary to create drop-down lists in comboboxes.
I have a special non-standard combobox with a dropdown list.
How to create a combobox dropdown window so that it works in all operating systems?
Right now I have a dropdown based on FormStyle = fsStayOnTop working in Widnows but not working in Linux.


--- Quote from: dmitryb on November 19, 2022, 02:54:18 am ---How to create a combobox dropdown window so that it works in all operating systems?

--- End quote ---
I agree, ComboBox DropDownCount is for whatever reason not supported by any Linux based OS, it aint a FPC/Lazarus failure.
Solution, create your own OS independent controlled component or switch to ListBox (maybe resize when focused/focus left) or rethink about your modal usage.


[0] Message Index

Go to full version