Autor Beitrag
Psyko²k
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 09.04.05 09:19 
Hey at all.

Hab eine weitere Anfängerfrage für euch.

Ich möchte, dass wenn ich bei meiner DBCombobox1 etwas wähle (in diesem fall "andere")
dass dann rechts das AndereLabel.Visible:=true; wird.
Wusste nicht ob das on DrawItem und wenn ja ob ich das mit einer if abfrage machen muss oder wie.

Danke für alle hilfen

Moderiert von user profile iconAXMD: Delphi-Tags hinzugefügt.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Sa 09.04.05 09:31 
Hallo,

bei einer kleinen überschaubaren Menge kannst du so vorgehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
//OnClick-Ereignis
begin
  with TComboBox(Sender) do begin
    case ItemIndex of
      10:
        AndereLabel.Visible := True;
      else
        AndereLabel.Visible := False;
    end;
  end;
end;
Ansonsten würde ich mit Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT arbeiten.

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.