2006/4/15, Bisma Jayadi <[EMAIL PROTECTED]>:
> Actually, I'd like to do it on Linux (and other non-win32 platforms). Most of 
> my
> codes on Delphi using this trick instead of using frame. Is there other trick 
> to
> do such kind of purposes beside this trick (and work on all platform)?

Well, it should be the way for on all plateform to work.

Now, I checked my code and your code is right. I've tested under win32 only.

TForm1 -- add a Panel1 and a Button1. Then add Unit2 in uses of
implementation section.
TForm2 -- add a Button1 with "Close;" OnClick event. Set the backgound
color of Form2 to someting else so that you can 'see' more easely if
you want. (I choosed clMaroon if you care ;) .)

In TForm1.Button1Click:
var
  f: TForm;
begin
  f := TForm2.Create(Self);
  f.BorderStyle := bsNone;
  f.Parent := Panel1;
  f.Align := alClient;
  f.Show;
end;

Ok, this is like your code. This is working under win32 with the
following issue:
- the focus behave like crasy: You can't click anymore on the Form1,
but only on Form2. If you press the Tab key, then the focus will go
back on Form1 and you will be able to work with Form1 and *also* click
on Form2. But the moment the focus goes back on Form2 you can't click
anymore on Form1.

I'm sure this bug can be corrected. But I can't test for myself under
linux right now.

Now, is Form2 showing at all under Linux/Gtk?

Best regards.

--
Alexandre Leclerc

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to