AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Brauche Nachhilfe in Case

Ein Thema von Daniel B · begonnen am 29. Jun 2002 · letzter Beitrag vom 29. Jun 2002
 
Daniel B
(Gast)

n/a Beiträge
 
#1

Brauche Nachhilfe in Case

  Alt 29. Jun 2002, 13:53
Hi,

ich habe 3-4 solcher abfragen/änderungen. Sowas lässt sich doch bestimmt mit case einfacher lösen. Ich verstehe es einfach nicht. Vielleicht kann mir jemand helfen.
Vielen Dank.


Code:
  if MainFormMC2004.ComPort.Port = 'COM1' then
  begin
    ComboBoxPort.ItemIndex:=0;
  end
  else if MainFormMC2004.ComPort.Port = 'COM2' then
  begin
    ComboBoxPort.ItemIndex:=1;
  end
  else if MainFormMC2004.ComPort.Port = 'COM3' then
  begin
    ComboBoxPort.ItemIndex:=2;
  end
  else if MainFormMC2004.ComPort.Port = 'COM4' then
  begin
    ComboBoxPort.ItemIndex:=3;
  end
  else if MainFormMC2004.ComPort.Port = 'COM5' then
  begin
    ComboBoxPort.ItemIndex:=4;
  end
  else if MainFormMC2004.ComPort.Port = 'COM6' then
  begin
    ComboBoxPort.ItemIndex:=5;
  end
  else if MainFormMC2004.ComPort.Port = 'COM7' then
  begin
    ComboBoxPort.ItemIndex:=6;
  end
  else if MainFormMC2004.ComPort.Port = 'COM8' then
  begin
    ComboBoxPort.ItemIndex:=7;
  end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:16 Uhr.
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 by Thomas Breitkreuz