Autor Beitrag
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 07.02.09 17:17 
Also ich möchte in meinem Email Programm ein paar Extras einbauen und plane dafür einen speziellen Button den ich in einigen Programmen schon gesehen habe.

user defined image

Wenn der Button geklickt wird öffnet sich ein kleines Menü, also wird sozusagen eingeblendet.

Ich weis leider garnicht was für eine Komponente das ist, könnt ihr mir helfen?

Gruß Dude566 :wink:

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Sa 07.02.09 17:26 
Du brauchst doch nur beim OnClick eine bestimmte Komponente (z.B. ein Panel) einblenden und natürlich das Formular vergrößern (ClientHeight). Dann änderst du den Caption und den Tag. Im Tag ist gespeichert, dass der Button beim nachesten Mal die Details verschwinden lassen soll. So einfach ist das :)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 07.02.09 17:30 
Ein TPopupMenu nehme ich an. ;-)

// EDIT:
Oder wie Yogu meint die Größe ändern, wenn du das meinst, ja.
Dude566 Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 07.02.09 17:39 
Ja aber, das Formular ist recht klein gehalten, und es sind unter diesem Button weitere, das heist wenn sich dann das Panel einblendet und das Formular vergrößern, müssen diese auch weiter nach unten rutschen.

Wie lege ich die Position von ihnen Fest?

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Sa 07.02.09 17:47 
ausblenden Delphi-Quelltext
1:
Button1.Top := Button1.Top + 100;					

?

_________________
PROGRAMMER: A device for converting coffee into software.
Dude566 Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 07.02.09 18:17 
Ok, war eine ganz schöne Fummelerei aber jetzt habe ich es.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Sa 07.02.09 18:27 
user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Ok, war eine ganz schöne Fummelerei aber jetzt habe ich es.

Du hättest auch alle Komponenten auf ein Panel legen können, und dann nur dieses verschieben.

_________________
PROGRAMMER: A device for converting coffee into software.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 07.02.09 18:28 
Man kann es auch ganz automatisch machen. :lol:
Man muss ja nur alle Komponenten durchgehen, ich kann ja eine Demo dazu schreiben.
Dude566 Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 07.02.09 18:32 
Ich habe es jetzt so gemacht:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
procedure TForm1.Button3Click(Sender: TObject);
begin
if NOT aktiv then
  begin
    Panel1.Visible := true;
    aktiv := true;
    Form1.Height := 234;
    Form1.Width  := 325;
    Button1.Top  := 168;
    Button2.Top  := 168;
  end
else begin
      Panel1.Visible := false;
      Form1.Height := 177;
      Form1.Width  := 325;
      Button1.Top := 112;
      Button2.Top := 112;
      aktiv := false;
     end;

end;

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Dunkel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 682

Mac OS X Snow Leopard
Xcode 3.1
BeitragVerfasst: Sa 07.02.09 18:36 
Die Anchor-Eigenschaft von visuellen Komponenten ist auch eine feine Sache. Damit geht das (in den meisten Fällen) ganz ohne eigenen Programmcode.

_________________
Ich streite einsam mich mit dieser Oberflächenwelt
Gutes sei ein löblich Brot von dem ich zehre - bis zum Tod [Das Ich - Im Ich]
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 07.02.09 18:50 
user profile iconDunkel hat folgendes geschrieben Zum zitierten Posting springen:
Die Anchor-Eigenschaft von visuellen Komponenten ist auch eine feine Sache. Damit geht das (in den meisten Fällen) ganz ohne eigenen Programmcode.
Wie das? :shock: Das verstehe ich nicht. Ich glaube du hast das falsch verstanden...

So, ich hab eine Demo geschrieben, siehe Anhang. Da musst du nichts fest einprogrammieren, das geht alles automatisch. ;-)
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
procedure TfrmMain.DoBlendControl(uControl: TControl);
var
  i, PanelBottom, CompoShift: Integer;
begin
  {$BOOLEVAL OFF}
  CompoShift := uControl.Height + 6;
  if uControl.Visible then
  begin
    PanelBottom := uControl.Top + uControl.Height;
    uControl.Visible := False;
    for i := 0 to ComponentCount - 1 do
      if (Components[i] is TControl) and (TControl(Components[i]).Top > PanelBottom) then
        TControl(Components[i]).Top := TControl(Components[i]).Top - CompoShift;
    Height := Height - CompoShift;
    btnBlend.Caption := 'Erweitert >>';
  end
  else
  begin
    PanelBottom := uControl.Top;
    Height := Height + CompoShift;
    uControl.Visible := True;
    for i := 0 to ComponentCount - 1 do
      if (Components[i] is TControl) and (TControl(Components[i]).Top >= PanelBottom) then
        TControl(Components[i]).Top := TControl(Components[i]).Top + CompoShift;
    uControl.Top := PanelBottom;
    btnBlend.Caption := 'Erweitert <<';
  end;
end;

procedure TfrmMain.btnBlendClick(Sender: TObject);
begin
  DoBlendControl(pnlBlendPanel);
end;
Einloggen, um Attachments anzusehen!
Dude566 Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 07.02.09 19:00 
Echt net von dir, solch ein Engagement.

Ich verstehe es noch nicht ganz aber es ist auf jeden Fall praktisch.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Dunkel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 682

Mac OS X Snow Leopard
Xcode 3.1
BeitragVerfasst: Sa 07.02.09 23:17 
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:
user profile iconDunkel hat folgendes geschrieben Zum zitierten Posting springen:
Die Anchor-Eigenschaft von visuellen Komponenten ist auch eine feine Sache. Damit geht das * (in den meisten Fällen) ganz ohne eigenen Programmcode.
Wie das? :shock: Das verstehe ich nicht. Ich glaube du hast das falsch verstanden...

Zuerst eine Ergänzung meiner Aussage:
* "Verschieben/Ausrichten von visuellen Komponenten"

Ich denke nicht... :wink: (siehe bearbeitete Demo)

Aber Deine Lösung ist selbstverfreilich wesentlich komfortabler anzuwenden. :zustimm:
Einloggen, um Attachments anzusehen!
_________________
Ich streite einsam mich mit dieser Oberflächenwelt
Gutes sei ein löblich Brot von dem ich zehre - bis zum Tod [Das Ich - Im Ich]