Delphi-PRAXiS
Seite 5 von 6   « Erste     345 6      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Software-Projekte der Mitglieder (https://www.delphipraxis.net/26-software-projekte-der-mitglieder/)
-   -   TInfoBox - eine InfoBox direkt auf dem Desktop (https://www.delphipraxis.net/74297-tinfobox-eine-infobox-direkt-auf-dem-desktop.html)

Nils_13 9. Aug 2006 19:51

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Weil es zu Fehlern beim Beenden kommt.

3_of_8 9. Aug 2006 19:52

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Glaskugel in Reparatur, bitte Code zeigen. ;)

Nils_13 9. Aug 2006 20:18

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Delphi-Quellcode:
iib := ib.Create(listbox); // iib = Instanz; ib = InfoBox
genügt.

3_of_8 9. Aug 2006 20:35

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
So, tut es das?

Mir jedenfalls nicht.

Du erzeugst eine Instanz mit deiner Listbox als Ownder.

Was hilft mir das weiter? Richtig, gar nichts.

Nils_13 9. Aug 2006 21:02

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Hehe, ich meinte genügt für eine AV beim Beenden.

3_of_8 9. Aug 2006 21:12

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Also du machst folgendes:

iib := TInfoBox.Create(listbox);

Du bist dir sicher, dass die Listbox schon instantiiert ist?

Also ich hab einfach mal ne Form gebastelt, Listbox draufgeworfen, ins OnCreate...

Delphi-Quellcode:
var InfoBox: TInfoBox;
begin
InfoBox:=TInfoBox.Create(listbox1);
end;
...reingeschrieben. Funzt perfekt. Keine AV. Muss woanders dran liegen.

_frank_ 9. Aug 2006 23:37

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
wollte das auch mal probieren, aber leider zeigt es nix an...(auch keine AV)

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
  ib:=TInfobox.Create(self);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ib.Hide;
  ib.Width:=160;
  ib.Height:=100;
  with TLabel.Create(ib) do
  begin
    parent:=ib;
    Left:=8;
    Top:=8;
    Caption:='Blubb';
  end;
  ib.Show;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  if assigned(ib) then ib.free;
end;
warum (nicht D3-kompatibel, Doublebuffered ist raus, sonst nichts verändert)?

Gruß Frank

3_of_8 9. Aug 2006 23:54

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Lass mal das Free im FormDestroy weg, das macht die Form automatisch, da sie der Owner ist.

Dein Problem überprüfe ich mal.

_frank_ 9. Aug 2006 23:55

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
ich bekomme keine AV!

es wird keine infobox angezeigt beim buttonclick...

3_of_8 9. Aug 2006 23:57

Re: TInfoBox - eine InfoBox direkt auf dem Desktop
 
Ich weiß, dass du keine kriegst. Lass es trotzdem weg, es ist unnötig.

Zu deinem Problem: So komisch es klingt: Du musst ein Parent zuweisen.

Pack ein...
Delphi-Quellcode:
ib.Parent:=Self;
...in das FormCreate und dann gehts auch.


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:38 Uhr.
Seite 5 von 6   « Erste     345 6      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz