Forum > General

Lazarus MDI application.

(1/2) > >>

BSaidus:
Hello, I think there is a bug, or non finished work on MDI application in lazarus/fpc.
  for Exemple, I can not make a child (form)window in the sametime 
    Formstyle = fsMDIChild & disable the maximize button & borderstyle to BorderStyle
i.e
 This combinaison of params do not work ( it take only the first one).
 self.FormStyle := fsMDIChild;
 self.BorderStyle := bsSingle;
 self.BorderIcons := [biSystemMenu, biMinimize];

So I wonder on how to make my child form not sizable and disactivate the maximize button and letting this form to be MDIChid.

Thank you.

jamie:
Why not simply control the constraints in the OnConstraintResize event ?

BSaidus:

--- Quote from: jamie on December 01, 2024, 04:17:03 pm ---Why not simply control the constraints in the OnConstraintResize event ?

--- End quote ---
I did it, but the maximise button still visible, even when I use api windows to disactivate it, the MDIChild flag disapeare.
thanks.

jamie:
you can make a customized window by using a TFRame.

It will require you to draw your own border etc., but You can place a TPanel at the top with your own controls and manage the sizing of the window yourself.

 the Work area, being the client can be another TPanel and so on.

 what you don't get out of this is any menus that normally get attached to the Main parent window.

 It's your choice but normally MDIchilds require those icons.

jamie:
You can try removing the "WS_MaximizeBox" using the GetWindowLongPtr and SetWindowLowPtr to change the value of the Window Style Field.

  You first need to read it and then XOR the bit out.

 jamie

Navigation

[0] Message Index

[#] Next page

Go to full version