Re: [Lazarus] MDI implementation

2011-11-17 Thread zeljko
On Thursday 17 of November 2011 08:24:33 Graeme Geldenhuys wrote:
 On 17/11/2011, zeljko zeljko@... wrote:
  What are you talking about ?
 
 An earlier post (from somebody else) said that LCL MDI support is only
 implemented in Win32 and Qt. All other platforms are not supported
 because their native widgetsets don't have something like MDI built
 in. LCL only wants to use native MDI. Thus LCL is a bit screwed
 because now you have a cross platform LCL, but not all features of LCL
 work on all platforms. Now the application developer is f**ked because
 he needs to keep checking which features work on which platforms.
 Oops! Totally defeating the point of a cross platform development
 framework don't you think.


LCL is not screwed. As I said *mdiemulator is there for other widgetsets* 
Look screenshoots of gtk/gtk2 mdi here:
http://wiki.lazarus.freepascal.org/Image:Mdiemulator_gtk.png
http://wiki.lazarus.freepascal.org/Image:Mdiemulator_gtk2.png

win32 ?
http://wiki.lazarus.freepascal.org/Image:Mdiemulator_win32.png

So, again: What are you talking about ?

 
 And now it's really funny. I got such a lot of sh*t from many lazarus
 developers about my custom drawn toolkit and how wrong that it
 compared to Lazarus native toolkit. Yet now somebody is working on
 implementing a custom drawn widgetset backend in the LCL. How ironic!

No, it's not ironic since fpgui works only on linux and win.Custom drawn 
widgetset idea comes because of problems with android and wince, and I'm 
pretty sure that it'll be finished in next months and support at least x3 more 
targets than fpgui which will be same as it was 2-3 years ago.

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-17 Thread Felipe Monteiro de Carvalho
On Thu, Nov 17, 2011 at 8:24 AM, Graeme Geldenhuys
graemeg.li...@gmail.com wrote:
 And now it's really funny. I got such a lot of sh*t from many lazarus
 developers about my custom drawn toolkit and how wrong that it
 compared to Lazarus native toolkit. Yet now somebody is working on
 implementing a custom drawn widgetset backend in the LCL. How ironic!

Well, I personally think that the LCL umbrella is big enough to fit
all tastes. There is no need to fight, people that prefer one or
another way are free to develop the widgetsets which they prefer. And
then each person can decide what to use:

1 Only native widgets
or
2 Only custom drawn widgets (futurely)

And we have a unique feature, which I've never heard of a framework having:

3 The hability to mix native and non-native widgets, which is very
powerful for my projects, for example see this:

http://wiki.lazarus.freepascal.org/fpbrowser#Screenshots

fpBrowser in Mac OS X has access to the native menus, but the native
TPageControl is undesirable in a browser. fpBrowser requires a
TPageControl with a reliable look and feel across platforms, so it
must be custom drawn. It also requires 2 features: Close Buttons and
also the Add Button for adding new tabs. The Add button is not just an
extra tab, since it's look can be anything depending on the Theme and
it also doesn't receive the close button. The native TPageControl in
Carbon/Cocoa cannot provide the required features.

So here I optimized fpBrowser by using a mix of Lazarus controls: a
native TMenu, but a non-native TPageControl.

Since quite a long time we already have the hability to mix native and
non-native Canvas support, TCanvas is the native one,
TLazIntfImage+TFPImageCanvas is the non-native one. I just expanded
this concept more broadly.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-17 Thread Graeme Geldenhuys
On 17/11/2011, zeljko zeljko@... wrote:

 LCL is not screwed. As I said *mdiemulator is there for other widgetsets*

Is this emulator part of LCL? Also what is this MultiDoc I see in the
lazarus wiki?

I haven't created a MDI application in over a decade, so had to google
it first. :-)  I followed the following Delphi MDI tutorial to the
letter - using latest Lazarus Trunk. I first tried that tutorial under
Delphi 7 and it worked flawlessly. Then I tried Lazarus trunk.

  http://delphi.about.com/od/objectpascalide/l/aa042500a.htm

I'm running under Linux, using the LCL-GTK2 widgetset. Needless to
say, MDI under Linux did NOT work! All child forms are created outside
the bounds of the MDI parent. Closing mdi child forms only work on
the 3rd attempt clicking the top right X button.


 http://wiki.lazarus.freepascal.org/Image:Mdiemulator_gtk.png
 http://wiki.lazarus.freepascal.org/Image:Mdiemulator_gtk2.png

Pretty pictures, but why doesn't it work in Lazarus trunk?


 No, it's not ironic since fpgui works only on linux and win.

Correction, fpGUI works on:  Linux, Windows, WinCE, Mac OS X (as an
x11 style application), FreeBSD and family, OpenSolaris and Embedded
arm-linux devices.


 targets than fpgui which will be same as it was 2-3 years ago.

What are you talking about?


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-17 Thread Graeme Geldenhuys
On 17/11/2011, Felipe Monteiro de Carvalho
felipemonteiro.carvalho@g wrote:
 all tastes. There is no need to fight, people that prefer one or
 another way are free to develop the widgetsets which they prefer. And
 then each person can decide what to use:

And this I have been saying for years. The point is you simply can't
create a cross-platform GUI development framework using native
controls. There are just too many differences between each native
toolkit, thus your cross-platform GUI framework can only at best use
the common features. Seriously crippling your framework. This is why
Qt  (and Java Swing) implements its own widgets, but simply uses the
native widget theme engine to paint on a Qt canvas. fpGUI could easily
do the same in one of its themes (eg: the XP/Vista/Win7 theme - which
is planned already).


 And we have a unique feature, which I've never heard of a framework having:

 3 The hability to mix native and non-native widgets, which is very
 powerful for my projects, for example see this:

Hardly unique. Delphi developers use many non-native widgets (Virtual
Treeview, Raize components, DevX components etc.) in there VCL
(native) applications.


Anyway, we were talking about MDI


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-17 Thread zeljko
On Thursday 17 of November 2011 09:39:26 Graeme Geldenhuys wrote:
 On 17/11/2011, zeljko zeljko@... wrote:
  LCL is not screwed. As I said *mdiemulator is there for other widgetsets*
 
 Is this emulator part of LCL? Also what is this MultiDoc I see in the

Not yet.

 lazarus wiki?

Multidoc is trying to mimic mdi, I've tried it once and I didn't like it.


 
 I haven't created a MDI application in over a decade, so had to google
 it first. :-)  I followed the following Delphi MDI tutorial to the
 letter - using latest Lazarus Trunk. I first tried that tutorial under
 Delphi 7 and it worked flawlessly. Then I tried Lazarus trunk.
 
   http://delphi.about.com/od/objectpascalide/l/aa042500a.htm
 
 I'm running under Linux, using the LCL-GTK2 widgetset. Needless to
 say, MDI under Linux did NOT work! All child forms are created outside
 the bounds of the MDI parent. Closing mdi child forms only work on
 the 3rd attempt clicking the top right X button.

MDI started few days ago, only qt fully supports MDI on all targets where it 
works under lazarus (mac, linux, win).
Gtk/Gtk2/Carbon isn't finished yet (depends on mdiemulator).
Win32 will have native implementation (same as qt).

 
  http://wiki.lazarus.freepascal.org/Image:Mdiemulator_gtk.png
  http://wiki.lazarus.freepascal.org/Image:Mdiemulator_gtk2.png
 
 Pretty pictures, but why doesn't it work in Lazarus trunk?

Because, mdiemulator isn't ready yet. I don't want to commit 
partial/incomplete solution.

 
  No, it's not ironic since fpgui works only on linux and win.
 
 Correction, fpGUI works on:  Linux, Windows, WinCE, Mac OS X (as an
 x11 style application), FreeBSD and family, OpenSolaris and Embedded
 arm-linux devices.
 
  targets than fpgui which will be same as it was 2-3 years ago.
 
 What are you talking about?

I'm talking about fpgui :)

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-17 Thread Graeme Geldenhuys
On 17 November 2011 11:06, zeljko zeljko@h... wrote:

 MDI started few days ago, only qt fully supports MDI on all targets where it
 works under lazarus (mac, linux, win).

OK, then the ever outdated LCL Roadmap wiki page needs to be updated.
It mentions than MDI would be in Lazarus 0.9.30. That version has come
and gone.

  http://wiki.freepascal.org/Roadmap


 What are you talking about?

 I'm talking about fpgui :)

That's what I thought. Next time, research the subject before you
spread FUD. You clearly haven't looked at fpGUI in the last 2-3 years.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-17 Thread zeljko
On Thursday 17 of November 2011 10:12:00 Graeme Geldenhuys wrote:
 On 17 November 2011 11:06, zeljko zeljko@h... wrote:
  MDI started few days ago, only qt fully supports MDI on all targets where
  it works under lazarus (mac, linux, win).
 
 OK, then the ever outdated LCL Roadmap wiki page needs to be updated.
 It mentions than MDI would be in Lazarus 0.9.30. That version has come
 and gone.

It does not mention that MDI would be in 0.9.30 . There's catch:
An MDI LCL emulator for widgetsets which does not support MDI, also native 
implementation of MDI for qt and win32/64.Trivial version of MDI *probably* 
will be included with 0.9.30. .

but, yes, roadmap should be updated.

 
   http://wiki.freepascal.org/Roadmap
 
  What are you talking about?
  
  I'm talking about fpgui :)
 
 That's what I thought. Next time, research the subject before you
 spread FUD. You clearly haven't looked at fpGUI in the last 2-3 years.

I did not, you're right. Mea culpa.

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-16 Thread Hans-Peter Diettrich

zeljko schrieb:

On Wednesday 16 of November 2011 07:48:37 Hans-Peter Diettrich wrote:

  Why does the MDI implementation not use the DockManager interface?


Because it uses native MDI where it's supported ?


This reminds me on native CommCtrls, which don't exist on non-Win32 
widgetsets. When all these controls come in a *portable* and a *Win32* 
flavor, the implementation would be simplified a lot.



  A DockManager has all functionality, required to implement MDI hosts and
  clients, so that only the properties (and menu) must be implemented.


I don't know yet how to implement MDI via dockmanager for other targets 
than qt and win32


The implementation is independent from any widgetset.

 ... I've maded an mdiemulator which works but still

has problems with positions inside mdi area.


This should be feasable - can you provide your source code?

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-16 Thread zeljko
On Wednesday 16 of November 2011 15:11:00 Hans-Peter Diettrich wrote:
 zeljko schrieb:
  On Wednesday 16 of November 2011 07:48:37 Hans-Peter Diettrich wrote:
Why does the MDI implementation not use the DockManager interface?
  
  Because it uses native MDI where it's supported ?
 
 This reminds me on native CommCtrls, which don't exist on non-Win32
 widgetsets. When all these controls come in a *portable* and a *Win32*
 flavor, the implementation would be simplified a lot.

qt mdi implementation works on all targets (win32,mac, linux, wince,android 
...whatever).

zeljko

 
A DockManager has all functionality, required to implement MDI hosts
and clients, so that only the properties (and menu) must be
implemented.
  
  I don't know yet how to implement MDI via dockmanager for other targets
  than qt and win32
 
 The implementation is independent from any widgetset.
 
   ... I've maded an mdiemulator which works but still
 
  has problems with positions inside mdi area.
 
 This should be feasable - can you provide your source code?

Yes, but must find it first :)

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-16 Thread Graeme Geldenhuys
On 16/11/2011, zeljko zeljko@h wrote:

 qt mdi implementation works on all targets (win32,mac, linux, wince,android
 ...whatever).

Yes, because they don't use OS supplied MDI, they implemented their
own cross-platform version. So why LCL doesn't want to do the same,
beats me. But if you guys like struggling, that's your prerogative.



-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-16 Thread zeljko
On Thursday 17 of November 2011 07:55:16 Graeme Geldenhuys wrote:
 On 16/11/2011, zeljko zeljko@h wrote:
  qt mdi implementation works on all targets (win32,mac, linux,
  wince,android ...whatever).
 
 Yes, because they don't use OS supplied MDI, they implemented their
 own cross-platform version. So why LCL doesn't want to do the same,
 beats me. But if you guys like struggling, that's your prerogative.

What are you talking about ?

1.MDI interface have same properties/routines as Delphi
2.Only 2 widgetsets have their MDI implementaton (win32, qt)
3.For other's I've written mdiemulator (which basically works), but have 
problem with left/top positions, so handle part should be rethinked, so 
widgetset (gtk2, carbon etc) should create form + title and take care of 
client rect (without title bar of mdi).
4.One day (but that's *one day in future*) we'll have lazarus custom drawn 
widgetset (yes, something like fpgui , but more friendly to lcl), and then 
we can talk about implement everything in lcl.
5.MDI support just started, so don't expect that it'll be finished next week 
(it could be if someone provide patches).

zeljko


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-16 Thread Graeme Geldenhuys
On 17/11/2011, zeljko zeljko@... wrote:

 What are you talking about ?

An earlier post (from somebody else) said that LCL MDI support is only
implemented in Win32 and Qt. All other platforms are not supported
because their native widgetsets don't have something like MDI built
in. LCL only wants to use native MDI. Thus LCL is a bit screwed
because now you have a cross platform LCL, but not all features of LCL
work on all platforms. Now the application developer is f**ked because
he needs to keep checking which features work on which platforms.
Oops! Totally defeating the point of a cross platform development
framework don't you think.

And now it's really funny. I got such a lot of sh*t from many lazarus
developers about my custom drawn toolkit and how wrong that it
compared to Lazarus native toolkit. Yet now somebody is working on
implementing a custom drawn widgetset backend in the LCL. How ironic!

-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] MDI implementation

2011-11-15 Thread Hans-Peter Diettrich

Why does the MDI implementation not use the DockManager interface?

A DockManager has all functionality, required to implement MDI hosts and 
clients, so that only the properties (and menu) must be implemented.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-15 Thread Paul Ishenin

16.11.2011 14:48, Hans-Peter Diettrich wrote:

Why does the MDI implementation not use the DockManager interface?

A DockManager has all functionality, required to implement MDI hosts and
clients, so that only the properties (and menu) must be implemented.


Maybe because lazarus goal is to implement things as much native as 
possible?


And since qt and win32 have native MDI lazarus must use them.

Best regards,
Paul Ishenin.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-11-15 Thread zeljko
On Wednesday 16 of November 2011 07:48:37 Hans-Peter Diettrich wrote:
 Why does the MDI implementation not use the DockManager interface?

Because it uses native MDI where it's supported ?

 A DockManager has all functionality, required to implement MDI hosts and
 clients, so that only the properties (and menu) must be implemented.

I don't know yet how to implement MDI via dockmanager for other targets than 
qt and win32 ... I've maded an mdiemulator which works but still has problems 
with positions inside mdi area.

zeljko
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-04 Thread Patrick Chevalley
Hi,

You can get the last version for Multidoc from the svn for my skychart
application,
see http://wiki.lazarus.freepascal.org/MultiDoc
It work with Lazarus 0.9.30 and svn trunk.

But the zeljko way look much better, so I eagerly await I can trash it :-)

Patrick

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-04 Thread William Oliveira Ferreira
Maybe i'll say a pile of bullshit, but: Could contraints solve this
problem as a workaround?

William de Oliveira Ferreira
Bacharel em Sistemas de Informação



2011/4/4 Patrick Chevalley pcheval...@gmail.com:
 Hi,

 You can get the last version for Multidoc from the svn for my skychart
 application,
 see http://wiki.lazarus.freepascal.org/MultiDoc
 It work with Lazarus 0.9.30 and svn trunk.

 But the zeljko way look much better, so I eagerly await I can trash it :-)

 Patrick

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-03 Thread zeljko

Quoting Daniel Franzini daniel.franz...@gmail.com:


Hi there.

I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus
0.9.31).


MDI isn't yet supported on lazarus, but will be available soon.
You can see progres at my todo list.
http://wiki.lazarus.freepascal.org/User:Zeljan
There are also some mdi screenshoots.

zeljko


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-03 Thread Daniel Franzini
Thank you, Peter.

I already tried in Delphi and it works fine. I wanted to do this in Lazarus
because I intended it to work in Linux too.

But thanks anyway for the tip and the code.

2011/4/2 Peter Williams pewilliams2...@live.com

  Hi Daniel,

 --
 Date: Sat, 2 Apr 2011 19:02:46 -0300
 From: daniel.franz...@gmail.com
 To: lazarus@lists.lazarus.freepascal.org
 Subject: [Lazarus] MDI implementation


 Hi there.

 I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus
 0.9.31).

 I created the main form and set its FormStyle property to fsMDIForm. Then I
 created the child form and set its FormsStyle to fsMDIChild.

 I also created a menu where I can start a new form. I moved the child form
 the non-automatic-created form list. And used the following code to create
 it:

 -
 procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);
 var frmChild: TfrmRelatVend;
 begin
 frmChild := TfrmRelatVend.Create(self);
 frmChild.Show;
 end;
 -

 I also wrote a formClose handler for the child so it gets freed when I
 close it.
 -
 procedure TfrmRelatVend.FormClose(Sender: TObject;
 var CloseAction: TCloseAction);
 begin
 CloseAction := caFree;
 end;
 -

 Altough the form gets created and shows up, it does not have a MDI
 behavior, eg, it does not stay in the limits of its parent form and it
 gets maximized on top of its parent form.

 What am I doing wrong?

 thank you

 I cannot tell you exactly what you're doing wrong, but I can do the next
 best thing.

 I have a Simple_Ed (simple text editor) which supports unlimited MDI child
 text windows working.

 You can find it here:

 https://sites.google.com/site/pewtas/home/delphi_source_code

 https://sites.google.com/site/pewtas/home/delphi_source_codeand the
 download for the Delphi 7 source code is here:

 simple_ed_005_src.zip 
 https://sites.google.com/site/pewtas/simple_ed_005_src.zip?attredirects=019
 KB - The Delphi source code files only

 (Note that this has a main form and a child MDI form).

 Best Regards,
 Peter / pew

 --
 Daniel

 Let us change our traditional attitude to the construction of programs.
 Instead of imagining that our main task is to instruct a computer what to
 do, let us concentrate rather on explaining to human beings what we want a
 computer to do. (Donald Knuth)

 Yes, technogeeks can be funny, even if only to each other. (
 http://www.boogieonline.com/revolution/science/humor/)

 Man is driven to create; I know I really love to create things. And while
 I'm not good at painting, drawing, or music, I can write software.
 (Yukihiro Matsumoto, a.k.a. ``Matz'')

 -- ___ Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Daniel

Let us change our traditional attitude to the construction of programs.
Instead of imagining that our main task is to instruct a computer what to
do, let us concentrate rather on explaining to human beings what we want a
computer to do. (Donald Knuth)

Yes, technogeeks can be funny, even if only to each other. (
http://www.boogieonline.com/revolution/science/humor/)

Man is driven to create; I know I really love to create things. And while
I'm not good at painting, drawing, or music, I can write software.
(Yukihiro Matsumoto, a.k.a. ``Matz'')
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-03 Thread Peter Williams

Hi Daniel,

Date: Sun, 3 Apr 2011 10:28:07 -0300
From: daniel.franz...@gmail.com
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus] MDI implementation

Thank you, Peter.

I already tried in Delphi and it works fine. I wanted to do this in Lazarus 
because I intended it to work in Linux too.

But thanks anyway for the tip and the code.

I found that my Delphi code does not compile in Lazarus for MDI forms.
http://wiki.lazarus.freepascal.org/MultiDoc
MultiDoc is the Lazarus version of MDI forms.
http://sourceforge.net/projects/lazarus-ccr/files/MultiDoc/MultiDoc%200.2/multidoc-0.2.zip/download
I installed it and ran the demo and found that when I have some child forms, 
when I close one of the forms I get an EAccess violation error (216) exception.
Does anyone know how we can get rid of this AV error ???
Note the component is dated 2007-01-06 and version 0.2.
Best Regards,Peter / pew

2011/4/2 Peter Williams pewilliams2...@live.com






Hi Daniel,

Date: Sat, 2 Apr 2011 19:02:46 -0300
From: daniel.franz...@gmail.com
To: lazarus@lists.lazarus.freepascal.org

Subject: [Lazarus] MDI implementation

Hi there.

I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31).

I created the main form and set its FormStyle property to fsMDIForm. Then I 
created the child form and set its FormsStyle to fsMDIChild.



I also created a menu where I can start a new form. I moved the child form the 
non-automatic-created form list. And used the following code to create it:

-
procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);


var frmChild: TfrmRelatVend;
begin
frmChild := TfrmRelatVend.Create(self);
frmChild.Show;
end; 
-

I also wrote a formClose handler for the child so it gets freed when I close it.


-
procedure TfrmRelatVend.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caFree;
end;  
-

Altough the form gets created and shows up, it does not have a MDI behavior, 
eg, it does not stay in the limits of its parent form and it gets maximized 
on top of its parent form.



What am I doing wrong?

thank you
I cannot tell you exactly what you're doing wrong, but I can do the next best 
thing.
I have a Simple_Ed (simple text editor) which supports unlimited MDI child text 
windows working.

You can find it here:
https://sites.google.com/site/pewtas/home/delphi_source_code

and the download for the Delphi 7 source code is here:
simple_ed_005_src.zip 19 KB - The Delphi source code files only


(Note that this has a main form and a child MDI form).
Best Regards,Peter / pew
-- 
Daniel

Let us change our traditional attitude to the construction of programs. 
Instead of imagining that our main task is to instruct a computer what to do, 
let us concentrate rather on explaining to human beings what we want a computer 
to do. (Donald Knuth)



Yes, technogeeks can be funny, even if only to each other. 
(http://www.boogieonline.com/revolution/science/humor/)


Man is driven to create; I know I really love to create things. And while I'm 
not good at painting, drawing, or music, I can write software. (Yukihiro 
Matsumoto, a.k.a. ``Matz'')



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
  

--

___

Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Daniel

Let us change our traditional attitude to the construction of programs. 
Instead of imagining that our main task is to instruct a computer what to do, 
let us concentrate rather on explaining to human beings what we want a computer 
to do. (Donald Knuth)


Yes, technogeeks can be funny, even if only to each other. 
(http://www.boogieonline.com/revolution/science/humor/)

Man is driven to create; I know I really love to create things. And while I'm 
not good at painting, drawing, or music, I can write software. (Yukihiro 
Matsumoto, a.k.a. ``Matz'')



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
  --
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-03 Thread Daniel Franzini
Hi Peter.

I found this version to be newer.

http://www.oocities.org/br/hipernetjr/lmdi/index_en.html

It seems to work well, but needs further testing.

2011/4/3 Peter Williams pewilliams2...@live.com

  Hi Daniel,

 --
 Date: Sun, 3 Apr 2011 10:28:07 -0300

 From: daniel.franz...@gmail.com
 To: lazarus@lists.lazarus.freepascal.org
 Subject: Re: [Lazarus] MDI implementation


 Thank you, Peter.

 I already tried in Delphi and it works fine. I wanted to do this in
 Lazarus because I intended it to work in Linux too.

 But thanks anyway for the tip and the code.

 I found that my Delphi code does not compile in Lazarus for MDI forms.

 http://wiki.lazarus.freepascal.org/MultiDoc

 MultiDoc is the Lazarus version of MDI forms.


 http://sourceforge.net/projects/lazarus-ccr/files/MultiDoc/MultiDoc%200.2/multidoc-0.2.zip/download

 I installed it and ran the demo and found that when I have some child
 forms, when I close one of the forms I get an EAccess violation error (216)
 exception.

 Does anyone know how we can get rid of this AV error ???

 Note the component is dated 2007-01-06 and version 0.2.

 Best Regards,
 Peter / pew

 2011/4/2 Peter Williams pewilliams2...@live.com

  Hi Daniel,

 --
 Date: Sat, 2 Apr 2011 19:02:46 -0300
 From: daniel.franz...@gmail.com
 To: lazarus@lists.lazarus.freepascal.org
 Subject: [Lazarus] MDI implementation


 Hi there.

 I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus
 0.9.31).

 I created the main form and set its FormStyle property to fsMDIForm. Then I
 created the child form and set its FormsStyle to fsMDIChild.

 I also created a menu where I can start a new form. I moved the child form
 the non-automatic-created form list. And used the following code to create
 it:

 -
 procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);
 var frmChild: TfrmRelatVend;
 begin
 frmChild := TfrmRelatVend.Create(self);
 frmChild.Show;
 end;
 -

 I also wrote a formClose handler for the child so it gets freed when I
 close it.
 -
 procedure TfrmRelatVend.FormClose(Sender: TObject;
 var CloseAction: TCloseAction);
 begin
 CloseAction := caFree;
 end;
 -

 Altough the form gets created and shows up, it does not have a MDI
 behavior, eg, it does not stay in the limits of its parent form and it
 gets maximized on top of its parent form.

 What am I doing wrong?

 thank you

 I cannot tell you exactly what you're doing wrong, but I can do the next
 best thing.

 I have a Simple_Ed (simple text editor) which supports unlimited MDI child
 text windows working.

 You can find it here:

 https://sites.google.com/site/pewtas/home/delphi_source_code

 https://sites.google.com/site/pewtas/home/delphi_source_codeand the
 download for the Delphi 7 source code is here:

 simple_ed_005_src.zip 
 https://sites.google.com/site/pewtas/simple_ed_005_src.zip?attredirects=019
 KB - The Delphi source code files only

 (Note that this has a main form and a child MDI form).

 Best Regards,
 Peter / pew

 --
 Daniel

 Let us change our traditional attitude to the construction of programs.
 Instead of imagining that our main task is to instruct a computer what to
 do, let us concentrate rather on explaining to human beings what we want a
 computer to do. (Donald Knuth)

 Yes, technogeeks can be funny, even if only to each other. (
 http://www.boogieonline.com/revolution/science/humor/)

 Man is driven to create; I know I really love to create things. And while
 I'm not good at painting, drawing, or music, I can write software.
 (Yukihiro Matsumoto, a.k.a. ``Matz'')

 -- ___ Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




 --
 Daniel

 Let us change our traditional attitude to the construction of programs.
 Instead of imagining that our main task is to instruct a computer what to
 do, let us concentrate rather on explaining to human beings what we want a
 computer to do. (Donald Knuth)

 Yes, technogeeks can be funny, even if only to each other. (
 http://www.boogieonline.com/revolution/science/humor/)

 Man is driven to create; I know I really love to create things. And while
 I'm not good at painting, drawing, or music, I can write software.
 (Yukihiro Matsumoto, a.k.a. ``Matz'')

 -- ___ Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Daniel

Let us change our

Re: [Lazarus] MDI implementation

2011-04-03 Thread Peter Williams

Hi Daniel,
I am getting now an error with the new version. I try to install it and it 
comes back with cannot find package LMDI (or possibly graph).
Best Regards,Peter / pew

Date: Sun, 3 Apr 2011 14:17:18 -0300
From: daniel.franz...@gmail.com
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus] MDI implementation

Hi Peter.

I found this version to be newer.

http://www.oocities.org/br/hipernetjr/lmdi/index_en.html

It seems to work well, but needs further testing.


2011/4/3 Peter Williams pewilliams2...@live.com






Hi Daniel,

Date: Sun, 3 Apr 2011 10:28:07 -0300
From: daniel.franz...@gmail.com
To: lazarus@lists.lazarus.freepascal.org

Subject: Re: [Lazarus] MDI implementation

Thank you, Peter.

I already tried in Delphi and it works fine. I wanted to do this in Lazarus 
because I intended it to work in Linux too.


But thanks anyway for the tip and the code.

I found that my Delphi code does not compile in Lazarus for MDI forms.
http://wiki.lazarus.freepascal.org/MultiDoc

MultiDoc is the Lazarus version of MDI forms.
http://sourceforge.net/projects/lazarus-ccr/files/MultiDoc/MultiDoc%200.2/multidoc-0.2.zip/download

I installed it and ran the demo and found that when I have some child forms, 
when I close one of the forms I get an EAccess violation error (216) exception.
Does anyone know how we can get rid of this AV error ???

Note the component is dated 2007-01-06 and version 0.2.
Best Regards,Peter / pew

2011/4/2 Peter Williams pewilliams2...@live.com






Hi Daniel,

Date: Sat, 2 Apr 2011 19:02:46 -0300
From: daniel.franz...@gmail.com
To: lazarus@lists.lazarus.freepascal.org


Subject: [Lazarus] MDI implementation

Hi there.

I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31).

I created the main form and set its FormStyle property to fsMDIForm. Then I 
created the child form and set its FormsStyle to fsMDIChild.




I also created a menu where I can start a new form. I moved the child form the 
non-automatic-created form list. And used the following code to create it:

-
procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);



var frmChild: TfrmRelatVend;
begin
frmChild := TfrmRelatVend.Create(self);
frmChild.Show;
end; 
-

I also wrote a formClose handler for the child so it gets freed when I close it.



-
procedure TfrmRelatVend.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caFree;
end;  
-

Altough the form gets created and shows up, it does not have a MDI behavior, 
eg, it does not stay in the limits of its parent form and it gets maximized 
on top of its parent form.




What am I doing wrong?

thank you
I cannot tell you exactly what you're doing wrong, but I can do the next best 
thing.
I have a Simple_Ed (simple text editor) which supports unlimited MDI child text 
windows working.


You can find it here:
https://sites.google.com/site/pewtas/home/delphi_source_code


and the download for the Delphi 7 source code is here:
simple_ed_005_src.zip 19 KB - The Delphi source code files only



(Note that this has a main form and a child MDI form).
Best Regards,Peter / pew
-- 
Daniel

Let us change our traditional attitude to the construction of programs. 
Instead of imagining that our main task is to instruct a computer what to do, 
let us concentrate rather on explaining to human beings what we want a computer 
to do. (Donald Knuth)




Yes, technogeeks can be funny, even if only to each other. 
(http://www.boogieonline.com/revolution/science/humor/)



Man is driven to create; I know I really love to create things. And while I'm 
not good at painting, drawing, or music, I can write software. (Yukihiro 
Matsumoto, a.k.a. ``Matz'')



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
  

--

___

Lazarus mailing list

Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Daniel

Let us change our traditional attitude to the construction of programs. 
Instead of imagining that our main task is to instruct a computer what to do, 
let us concentrate rather on explaining to human beings what we want a computer 
to do. (Donald Knuth)



Yes, technogeeks can be funny, even if only to each other. 
(http://www.boogieonline.com/revolution/science/humor/)


Man is driven to create; I know I really love to create things. And while I'm 
not good at painting, drawing, or music, I can write software. (Yukihiro 
Matsumoto, a.k.a. ``Matz'')



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

[Lazarus] MDI implementation

2011-04-02 Thread Daniel Franzini
Hi there.

I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus
0.9.31).

I created the main form and set its FormStyle property to fsMDIForm. Then I
created the child form and set its FormsStyle to fsMDIChild.

I also created a menu where I can start a new form. I moved the child form
the non-automatic-created form list. And used the following code to create
it:

-
procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);
var frmChild: TfrmRelatVend;
begin
frmChild := TfrmRelatVend.Create(self);
frmChild.Show;
end;
-

I also wrote a formClose handler for the child so it gets freed when I close
it.
-
procedure TfrmRelatVend.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caFree;
end;
-

Altough the form gets created and shows up, it does not have a MDI behavior,
eg, it does not stay in the limits of its parent form and it gets
maximized on top of its parent form.

What am I doing wrong?

thank you


-- 
Daniel

Let us change our traditional attitude to the construction of programs.
Instead of imagining that our main task is to instruct a computer what to
do, let us concentrate rather on explaining to human beings what we want a
computer to do. (Donald Knuth)

Yes, technogeeks can be funny, even if only to each other. (
http://www.boogieonline.com/revolution/science/humor/)

Man is driven to create; I know I really love to create things. And while
I'm not good at painting, drawing, or music, I can write software.
(Yukihiro Matsumoto, a.k.a. ``Matz'')
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] MDI implementation

2011-04-02 Thread Peter Williams

Hi Daniel,

Date: Sat, 2 Apr 2011 19:02:46 -0300
From: daniel.franz...@gmail.com
To: lazarus@lists.lazarus.freepascal.org
Subject: [Lazarus] MDI implementation

Hi there.

I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31).

I created the main form and set its FormStyle property to fsMDIForm. Then I 
created the child form and set its FormsStyle to fsMDIChild.


I also created a menu where I can start a new form. I moved the child form the 
non-automatic-created form list. And used the following code to create it:

-
procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);

var frmChild: TfrmRelatVend;
begin
frmChild := TfrmRelatVend.Create(self);
frmChild.Show;
end; 
-

I also wrote a formClose handler for the child so it gets freed when I close it.

-
procedure TfrmRelatVend.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caFree;
end;  
-

Altough the form gets created and shows up, it does not have a MDI behavior, 
eg, it does not stay in the limits of its parent form and it gets maximized 
on top of its parent form.


What am I doing wrong?

thank you
I cannot tell you exactly what you're doing wrong, but I can do the next best 
thing.
I have a Simple_Ed (simple text editor) which supports unlimited MDI child text 
windows working.
You can find it here:
https://sites.google.com/site/pewtas/home/delphi_source_code
and the download for the Delphi 7 source code is here:
simple_ed_005_src.zip 19 KB - The Delphi source code files only

(Note that this has a main form and a child MDI form).
Best Regards,Peter / pew
-- 
Daniel

Let us change our traditional attitude to the construction of programs. 
Instead of imagining that our main task is to instruct a computer what to do, 
let us concentrate rather on explaining to human beings what we want a computer 
to do. (Donald Knuth)


Yes, technogeeks can be funny, even if only to each other. 
(http://www.boogieonline.com/revolution/science/humor/)

Man is driven to create; I know I really love to create things. And while I'm 
not good at painting, drawing, or music, I can write software. (Yukihiro 
Matsumoto, a.k.a. ``Matz'')



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
  --
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus