Autor Beitrag
Mr.Anderson
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: Do 21.08.03 16:13 
Hallo

bin absoluter delphi neuling.
also ich hab ne combobox mit 4 einträgen darin, wenn ich jetzt auf einen dieser einträge klicke möchte ich, dass eine weitere versteckte combobox sichtbar gemacht wird.
ist das möglich, wenn ja wie?????

bin dankbar für jeden noch so kleinen tip!!!!!

oder ist es eleganter durch einen befehl eine neue combobox zu erstellen???

gruß
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Do 21.08.03 19:04 
1)

ausblenden Delphi-Quelltext
1:
2:
3:
If ComboBox1.ItemIndex=???
Then TueWas
Else TueNix;


2)
ausblenden Delphi-Quelltext
1:
2:
3:
If ComboBox1.Text=???
Then TueWas
Else TueNix;


Text ist das, was aktuell in der Box steht (kann u.U. vom User auch reingeschrieben werden) und ItemIndex findest du in der Hilfe..

_________________
Hasta La Victoria Siempre
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: Do 21.08.03 20:32 
hat sich doch einer überwunden, werde es gleich ausprobieren.

danke!!!!!!!!!!!!!!!!!!!!!!!!!!
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: Do 21.08.03 21:56 
also so sieht der code aus und es funzt leider nicht. zeigt dann OPERATOR ODER SEMIKOLON FEHLT an.

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:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    procedure ComboBox1Change(Sender: TObject);
    procedure Show;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
If ComboBox1.ItemIndex = 2 then Show ComboBox2;
end;

end.


Moderiert von user profile iconAya: Delphi-Tag korrigiert.
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: Do 21.08.03 22:20 
hat sich schon erledigt!!!!!!
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Fr 22.08.03 00:16 
... das will ich auch meinen. ;-)

_________________
Hasta La Victoria Siempre