Autor Beitrag
Tpercon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60



BeitragVerfasst: Mo 10.02.03 19:41 
Gibt es eine Möglichkeit, dass in einer DateTimePicker- Komponente garnichts drin steht, also es leer erscheint und man nur bei Bedarf ein Datum eingibt?

Gruß
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 10.02.03 20:09 
hmmmm du könntest ja mal versuchen das datum einfach rauszulöschen. da gibts dich ne eigenschaft dafür oder ??

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 10.02.03 20:18 
Datum rauslöschen geht glaube ich nicht. Aber man kann ja
ausblenden Quelltext
1:
datetimepicker1.enabled:=false					

zum deaktivieren der Komponente oder gar
ausblenden Quelltext
1:
datetimepicker1.visible:=false					

dann ist die Komponente unsichtbar.
Tpercon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60



BeitragVerfasst: Mo 10.02.03 20:39 
Deaktivieren oder unsichtbar machen sind leider programmtechnisch schlechte Möglichkeiten.
Irgendwie muß man das doch so hinbekommen? :cry:
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 10.02.03 22:47 
Ob es möglich ist kann ich Dir nicht sagen. Ich möchte Dich aber dennoch nach dem genauen Grund fragen warum Du ein "leeres" Datum benötigst. Wenn Du eventl. einen zustätzlichen Status vom User haben möchtest ob er in dem DateTimePicker etwas eingegeben hat dann benutze doch die integrierte CheckBox!

Gruß
TINO
Tpercon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60



BeitragVerfasst: Di 11.02.03 18:08 
Die CheckBox Variante sieht leider optisch nicht so toll aus, weshalb mir diese Lösung auch nicht gefällt.
Vielleicht kann man sich dieses Ding ja auch selbst aus einem TMonthCalendar und einer ComboBox basteln. Dies ist mir aber bis jetzt nicht gelungen. Kann mir da jemand helfen?


Gruß
Tpercon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60



BeitragVerfasst: Do 13.02.03 18:58 
Weiß keiner nen Rat?
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Fr 14.02.03 09:28 
Tpercon hat folgendes geschrieben:
Die CheckBox Variante sieht leider optisch nicht so toll aus, weshalb mir diese Lösung auch nicht gefällt.

Stimmt, so toll sieht das nicht aus. Ich mache das immer so das ich eine normale CheckBox (mit einer ordenlichen Caption) benutze und den Status Enabled vom tDateTimePicker gleich dem Checked-Zustand der CheckBox setze. Daher brauch ich keine neue Komponente zu erstellen und der User weiß immer sofort (da Standardkomponenten) was er machen soll.

Gruß
TINO
Tpercon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60



BeitragVerfasst: Fr 14.02.03 16:05 
Das würde echt schon besser aussehen.
Am liebsten würde mir natürlich die Methode gefallen, dass ich es doch noch hin bekomme, mir das selbst zu basteln, nur diese scheiß leere DropDown- Liste bei der ComboBox läßt mich verzweifeln. :cry: