Autor Beitrag
allshoot
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22


d5 standart
BeitragVerfasst: So 19.02.06 14:45 
Hallo Leute,

Ich habe ein Radiobutton und möchte überprüfen, ob etwas in .Caption drinsteht (Text oder Zahl) und wenn ja, dann diesen RadioButton auf .Visible:= true stellen.
Die Funktion IsCharAlpha funktioniert nicht.
Habt ihr ne Idee, wie ich das noch bewerkstelligen könnte?

THX im Voraus
allshoot
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 19.02.06 14:55 
Ich muss dich falsch verstande haben :gruebel:

Meinst du so?
ausblenden Delphi-Quelltext
1:
if radiobutton1.caption<>'' then radiobutton1.enabled:=true;					

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
allshoot Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22


d5 standart
BeitragVerfasst: So 19.02.06 15:03 
Hi, ich hatte es mit IsCharAlpha so probiert:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
      with Fragen[i].A1 do
          begin
           Left:=112; Top:=290; Width:=601; Height:=41; visible:=(IsCharAlpha(Frgen[i].Ai.Caption));
          end;

Damit sollte dann visible auf true gesetzt werden, wenn in Caption was drinsteht.

allshoot

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 19.02.06 15:06 
Was ist mit meiner Variante, geht die?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
allshoot Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22


d5 standart
BeitragVerfasst: So 19.02.06 15:13 
Hi, nee, denn in .Caption steht normalerweise ein String drin.
Wenn ich dann so probiere:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
 with Fragen[i].A1 do
  begin
    Left:=112; Top:=290; Width:=601; Height:=41; visible:=(IsCharAlpha(Fragen[i].Ai.Caption[1]));
  end;

dann gibt es ein Error aus, wenn garnichts drinsteht.

allshoot

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 19.02.06 15:17 
user profile iconallshoot hat folgendes geschrieben:
ob etwas in .Caption drinsteht

Und genau das überprüfst du mit der if-Abfrage im zweiten Posting ;)

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
allshoot Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22


d5 standart
BeitragVerfasst: So 19.02.06 15:21 
Danke Koller, so hat es gefunzt!
THX!
allshoot
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 19.02.06 15:24 
user profile iconallshoot hat folgendes geschrieben:
Danke Koller, so hat es gefunzt!
THX!
allshoot

Ich versteh nur nicht warum du das nicht gleich ausprobiert hast ;)

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
allshoot Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22


d5 standart
BeitragVerfasst: So 19.02.06 15:54 
Weil ich ein gaaaaanz neuer bin beim Programmieren ;-)
allshoot