Autor Beitrag
whitesnake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40

Win XP Home
Delphi 7 Personal, HTML
BeitragVerfasst: Mo 02.10.06 20:00 
hi,
wie kann man denn sowas realisieren:

WENN bedingung1 = true DANN
Button1 wird grau und kann nich mehr geklickt werden;

xD

bitte helft mir :)

bis denn


Moderiert von user profile iconGausi: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mo 02.10.2006 um 21:12
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 02.10.06 20:02 
Moin!

Probier das mal so:
ausblenden Delphi-Quelltext
1:
Button1.Enabled := (Bedingung1 = TRUE);					

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 02.10.06 20:02 
Die gesuchte Eigenschaft ist Enabled.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 02.10.06 20:03 
ausblenden Delphi-Quelltext
1:
Button.Active := False;					

_________________
Markus Kinzler.
whitesnake Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40

Win XP Home
Delphi 7 Personal, HTML
BeitragVerfasst: Mo 02.10.06 20:06 
das würde klappen...geht des auch umgekehrt?
quasi Button1.Disabled ?

das mit .Active funzt nicht

€dit: habs schon so wie ichs brauch... danke für die schnellen antworten :thumbsup: !!!


Zuletzt bearbeitet von whitesnake am Mo 02.10.06 20:10, insgesamt 1-mal bearbeitet
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8553
Erhaltene Danke: 479

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 02.10.06 20:08 
Wenn du Enabled auf False setzt, ist er disabled. Warum dann noch eine Eigenschaft Disabled, die ihn enabled, wenn man das auf False setzt? :nut:

Eins (also Enabled) reicht ;-)

_________________
We are, we were and will not be.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 02.10.06 20:08 
Du kannst dir ja einen eigenen Button ableiten, welcher diese weitere Eigenschaft als "Negativ" besitzt.

_________________
Markus Kinzler.