Autor Beitrag
Mindforce
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Do 19.10.06 22:23 
Hi,

ich hab da ein Problem in Delphi. UNDZWAR hab ich einen Code in ein PopUp menü gepackt, und ein Menü soll dies bewirken!

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TAddC.Button11Click(Sender: TObject);
begin
if formular1.button1.visible=true then formular1.Button1.Visible:=false else
OIForm.cb1.Text:='Button1';
OIForm.OI.clear;
OIForm.OI.AddComponent(Formular1.button1);
Formular1.Button1.Visible:=true;
end;


Nachdem man einmal draufgeklickt hat (button ist visible=false) springt er ja zum Punkt ELSE.
Der button ist jetzt Visible! Wicht wahr?! :roll:

Jetzt klickt man nochmal drauf und DANN muss er doch zum Punkt THEN sprichen, oder nicht?! :cry:

Das macht er aber nicht. Der Button bleibt immer Visible.
Vielleicht ist das von mir einfach ein dummheitsfehler... :wink:

Bitte helft mir...

Gruß,

M!ndforce

_________________
Our force; in mind.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 19.10.06 22:28 
Es schient ein begin..end zu fehlen oder was sind genau die Alternativen?

_________________
Markus Kinzler.
Mindforce Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Do 19.10.06 22:31 
...
Hier maln Link zu meinem Projekt :?

Link entfernt! kein offenes Prohekt ^^

raren geht leider net...

Links ist ein Fenster wo "TButton" und so steht. Da linkklick rauf. Schaus dir an ^^

Gruß,

M!ndforce

_________________
Our force; in mind.


Zuletzt bearbeitet von Mindforce am Do 19.10.06 22:37, insgesamt 1-mal bearbeitet
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 19.10.06 22:35 
Ich vermute mal daß es so heißen sollte:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TAddC.Button11Click(Sender: TObject);
begin
  if formular1.button1.visible=true then 
    formular1.Button1.Visible:=false 
  else
  begin
    OIForm.cb1.Text:='Button1';
    OIForm.OI.clear;
    OIForm.OI.AddComponent(Formular1.button1);
    Formular1.Button1.Visible:=true;
  end;
end;

_________________
Markus Kinzler.
Mindforce Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Do 19.10.06 22:37 
Hi,

sag ich doch. Ein dummheits fehler ^^!
Thx!
Funzt jetzt!

Gruß,

M!ndforce

_________________
Our force; in mind.