Autor Beitrag
beljo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 11:11 
hallo Leute,
weis leider nicht wie man einen Textfeld unsichtbar macht, bestimmt wisst Ihr wie es funzt
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormCreate(Sender: TObject);
begin
  radiobutton1.checked:=true ;
  if Radiobutton1.checked=true then
    edit1:= invisible  ;
  end;

Also so funzt es nicht..
Dnake im Vorraus

Moderiert von user profile iconGausi: Beitragsformatierung überarbeitet.
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mo 27.03.06 11:14 
ausblenden Delphi-Quelltext
1:
edit1.visible := false;					
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mo 27.03.06 11:15 
mach das mal so... dann gehts:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormCreate(Sender: TObject);
begin
  radiobutton1.checked:=true ;
  if Radiobutton1.checked=true then
    edit1.visible := True ;
end;
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mo 27.03.06 11:17 
@stefan

er wollte es unsichtbar haben ;) also doch false...
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mo 27.03.06 11:19 
also beim Form steht se standardmäßig auf False und es ist doch aber sichtbar :gruebel:

//Edit: also auf True stimmt (habs grad ausprobiert) ;-)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 27.03.06 11:55 
ausblenden Delphi-Quelltext
1:
  edit1.visible := radiobutton1.checked;					
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 27.03.06 12:57 
Die Form wird auch nach dem Create per Show sichtbar gemacht. Da ist es komplett egal, ob die Eigenschaft auf true oder false steht. So mal nebenbei:
"Visible" heist "sichtbar".
"true" heist "wahr"
"false" heist "falsch"
...
nicht wundern, wenn "sichtbar := wahr" zu einer sichtbaren Komponente führt ;)
Und FotDs Version ist natürlich mal wieder die schönste 8)

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
aim65
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 312

Win 9x, Win XP
Delphi 3pro, 7PE
BeitragVerfasst: Mo 27.03.06 13:33 
Ob elegant oder nicht, wenn's verschwinden soll, heißt's wohl
Edit1.visible := not RadioButton1.checked; :)
Sinspin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1340
Erhaltene Danke: 120

Win 10
RIO, CE, Lazarus
BeitragVerfasst: Mo 27.03.06 13:44 
bei deinem hauptformular spielt es keine rolle ob das visible=true oder false ist! da es via show() angezeigt wird und dann visible auf true gesetzt wird.

eine belibige komponente bekommst du mit visible:=false unsichtbar! und mit visible:=true wieder sichtbar.
denn visibility ist die sichtbarkeit und die setzt du auf false! also ist diese sann nicht mehr gegeben.

_________________
Wir zerstören die Natur und Wälder der Erde. Wir töten wilde Tiere für Trophäen. Wir produzieren Lebewesen als Massenware um sie nach wenigen Monaten zu töten. Warum sollte unser aller Mutter, die Natur, nicht die gleichen Rechte haben?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 27.03.06 13:45 
Nun haste meinen Post und alle anderen davor nochmal schön in einen zusammengefasst x)
Aber btw: Versuch mal ein TClientSocked Visible:=false zu machen, und das is auch ne Komponente ;>

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Sinspin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1340
Erhaltene Danke: 120

Win 10
RIO, CE, Lazarus
BeitragVerfasst: Mo 27.03.06 14:05 
dein zeug stand noch nicht da als ich den link angeclickt habe.

das ding ist nur eine komponente von typ TComponent weil die IDE sonst nicht in der lage ist das ding über den objectinspector auzuzeigen und zu verwalten. und um das dumme bildchen von dem ding in designer auf dem formular herumliegen zu haben.

_________________
Wir zerstören die Natur und Wälder der Erde. Wir töten wilde Tiere für Trophäen. Wir produzieren Lebewesen als Massenware um sie nach wenigen Monaten zu töten. Warum sollte unser aller Mutter, die Natur, nicht die gleichen Rechte haben?
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mo 27.03.06 14:19 
hab ich also doch recht gehabt :mrgreen:
:wink:
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 27.03.06 16:06 
@ Sinspin: Du weist, was ich mit der Haarspalterei meine x)

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.