Autor Beitrag
Stread
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 188

Win 7
Delphi XE
BeitragVerfasst: Mo 05.01.09 20:11 
Kann man wie bei einem Edit Feld bei einer Checkbox das Attribut Read Only irgendwie über Panel etc. aktivieren? Direkt geht es leider nicht.
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mo 05.01.09 20:18 
user profile iconStread hat folgendes geschrieben Zum zitierten Posting springen:
Kann man wie bei einem Edit Feld bei einer Checkbox das Attribut Read Only irgendwie über Panel etc. aktivieren? Direkt geht es leider nicht.

Bei einem Editfeld? Einer Checkbox? Na, was denn nun? :gruebel:
Meinst Du sowas?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  Edit1.ReadOnly := CheckBox1.Checked;
end;

Grüße,
Marc
Stread Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 188

Win 7
Delphi XE
BeitragVerfasst: Mo 05.01.09 20:20 
Nein, das Edit war nur zu verdeutlichung. Wie schafft man es dass man selber keine Häcken mehr in eine Checkbox setzen kann, sondern nur das Programm. Read Only halt.
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mo 05.01.09 20:23 
Aber die Lösung hast du dir doch bereits selbst geschrieben. :gruebel:
Checkbox auf das Panel setzen und dieses deaktivieren. ;)
Eine andere Möglichkeit fällt mir gerade nicht ein.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 05.01.09 20:28 
Moin!

user profile iconMarc. hat folgendes geschrieben Zum zitierten Posting springen:
Eine andere Möglichkeit fällt mir gerade nicht ein.
Unsauber: im Handler des OnClick-Ereignisses den Zustand wieder auf den gewünschten Wert setzen,
sauber: .Enabled := FALSE; und den Zustand über .State setzen. :idea: ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.