Recent

Author Topic: MDI FORMS  (Read 45573 times)

sanor

  • New member
  • *
  • Posts: 7
MDI FORMS
« on: January 26, 2010, 01:44:07 pm »
MDI is not yet implemented. Is there any provision for its implementation in lazarus?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: MDI FORMS
« Reply #1 on: January 26, 2010, 02:06:11 pm »

sanor

  • New member
  • *
  • Posts: 7
Re: MDI FORMS
« Reply #2 on: January 26, 2010, 03:23:21 pm »
What is the diference between MultiDoc and LMDI?

thanks

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1216
    • Burdjia
Re: MDI FORMS
« Reply #3 on: January 26, 2010, 04:30:51 pm »
Basicly, LMDI is Windows only while MultiDoc is multiplatform (Windows and Linux and may be MacOS also).
« Last Edit: January 26, 2010, 04:35:34 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: MDI FORMS
« Reply #4 on: February 05, 2010, 10:59:50 am »
\But MDI is not really recommended anymore:
http://msdn.microsoft.com/en-us/library/ms632591(VS.85).aspx

Even if still Microsoft Excel (2007) uses MDI forms...

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: MDI FORMS
« Reply #5 on: February 05, 2010, 11:53:02 am »
Quote
Many new and intermediate users find it difficult to learn to use MDI applications.
Stupid reason. I loved to compare large number lists by fast switching between tables per Ctrl+Tab. Such a pattern comparison wouldn't be possible with Alt+Tab. But at least Linux have nothing like MDI and that's a good reason to think about other solutions.
Lazarus 1.7 (SVN) FPC 3.0.0

Wodzu

  • Full Member
  • ***
  • Posts: 171
Re: MDI FORMS
« Reply #6 on: February 05, 2010, 02:56:13 pm »
I woul'd not say that it is not recommended byt he Microsoft. They only say to consider other models.

What is hard to learn it is their damn ribbon invention ;-)

davesimplewear

  • Sr. Member
  • ****
  • Posts: 321
    • Davids Freeware
Re: MDI FORMS
« Reply #7 on: February 06, 2010, 01:30:00 am »
Another way to approach MDI is to have your parent form and achild form using a panel on the main form as the parent for your child as below:

procedure TfMain.sbAddBooksClick(Sender: TObject);
var
aForm :TfAdd;
begin
   aForm := TfAdd.Create(pBack);
   with aForm do
     beginprocedure TfMain.sbAddBooksClick(Sender: TObject);
var
aForm :TfAdd;
begin
   aForm := TfAdd.Create(pBack);
   with aForm do
     begin
      BorderStyle := bsNone;
      BorderIcons :=[];
      Parent := pBack;
      Left :=0;
      Top :=0;
      Align := alClient;
      Show;
    end;
    sbAddBooks.Enabled:= False;
end;
      BorderStyle := bsNone;
      BorderIcons :=[];
      Parent := pBack;
      Left :=0;
      Top :=0;
      Align := alClient;
      Show;
    end;
    sbAddBooks.Enabled:= False;
end;

pBack being the panel on the main form the child being fAdd .

Hope that helps.

Regards
Dave
All things considered insanity seems the best option

davesimplewear

  • Sr. Member
  • ****
  • Posts: 321
    • Davids Freeware
Re: MDI FORMS
« Reply #8 on: February 06, 2010, 01:31:24 am »
HMMM something wrong with that paste, try again:

procedure TfMain.sbAddBooksClick(Sender: TObject);
var
aForm :TfAdd;
begin
   aForm := TfAdd.Create(pBack);
   with aForm do
     begin
      BorderStyle := bsNone;
      BorderIcons :=[];
      Parent := pBack;
      Left :=0;
      Top :=0;
      Align := alClient;
      Show;
    end;
    sbAddBooks.Enabled:= False;
end;
All things considered insanity seems the best option

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: MDI FORMS
« Reply #9 on: February 06, 2010, 10:53:42 am »
This doesn't work under Linux. Rather emulate the form by a panel.
Lazarus 1.7 (SVN) FPC 3.0.0

davesimplewear

  • Sr. Member
  • ****
  • Posts: 321
    • Davids Freeware
Re: MDI FORMS
« Reply #10 on: February 07, 2010, 12:31:09 am »
Sorry to burst your bubble, but it does work in linux as that is the only OS I use, as MDI is not available that is the point of it emulating the child, it is actually using the form in the panel, the panel emulates the child area, to look like it was mdi you just leave out the align and Border Style and Border Icons so that they show.

Regards
Dave
All things considered insanity seems the best option

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: MDI FORMS
« Reply #11 on: February 07, 2010, 10:51:12 am »
I don't get any header for the "mdi-form" even if I move a second form into with "Parent:=form1" (GTK2). Resizing, alignment, switching between mdi's etc. wouldn't be available too.
Lazarus 1.7 (SVN) FPC 3.0.0

davesimplewear

  • Sr. Member
  • ****
  • Posts: 321
    • Davids Freeware
Re: MDI FORMS
« Reply #12 on: February 07, 2010, 11:49:53 pm »
I guess that would leave multidoc, though why you would want mdi puzzles me, as there are other solutions out there for different child displays. You could use a pagecontrol creating a different sheet for whatever child, if you did not want tabs you would need to use a TNoteBook as at the present time the Tabs on aTPagecontrol won't hide. There was another control that simulated MDI but can't remember what it was called. As has been discussed previously the MDI interface is now dis-used.
Perhaps you could give an outline of what you are trying to achieve and someone might be able to suggest an alternative for you.

Regards
Dave
All things considered insanity seems the best option

scept1c

  • New member
  • *
  • Posts: 9
Re: MDI FORMS
« Reply #13 on: February 08, 2010, 01:24:15 pm »
"Basicly, LMDI is Windows only while MultiDoc is multiplatform (Windows and Linux and may be MacOS also)"
do you prefer to use LMDI or Multidoc? what to choose?

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1216
    • Burdjia
Re: MDI FORMS
« Reply #14 on: February 08, 2010, 01:45:20 pm »
I never used them. Actually I never used "MDI". ::)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018