Autor Beitrag
OliverN_26
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Sa 22.12.07 11:54 
Hi!

Hab ein kleines Problem.
Hab nen Button (speichern), den man zwar sieht, aber das drücken soll erst später frei geschalten werden.
Wenn ich den BitBtn jetzt aber 'enabled := false;' setze, verschwindet das Glyph.
Wieso?

Mach ich was falsch oder kann man das irgendwie abschalten?

Danke
LorenzS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128

MS-DOS, WIN 7, WIN 10
BP7.0, D3, D5
BeitragVerfasst: Sa 22.12.07 11:59 
und kommt es bei enabled := true; wieder?
dann soltte eigentlich alles richtig sein, disabled button werden ja auch lichtgrau

enabled := true; // button kann man anklicken
enabled := false;// button kann man nicht anklicken
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Sa 22.12.07 12:04 
Nee. Kann sein dass ich mich falsch ausgedrückt hab.

Wenn ich nen normalen TButton auf enabled:=false setze, kann ich ihn nich mehr betätigen, er wird "lichtgrau", aber ich kann trotzdem noch die caption lesen !!!!

Wenn ich den BitBtn auf enabled:=false setze, kann ich ihne zwar nicht mehr betätigen, aber ich sehe nur noch den grauen Kasten des BitBtns. Das Bild was ich über Glyph geladen habe ist nicht zu 1% sehen. Verschwindet komplett.

Und wenn ich einfach nur nen leeren Button im Programm stehen hab, ohne Caption und Bild, sieht das schon recht dumm aus.

MfG
LorenzS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128

MS-DOS, WIN 7, WIN 10
BP7.0, D3, D5
BeitragVerfasst: Sa 22.12.07 12:06 
mit visible:=false; sieht es nicht mehr dumm aus
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Sa 22.12.07 12:07 
muss es unbedingt TBitBtn sein, reicht vielleicht TSpeedButton

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
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: Sa 22.12.07 12:09 
Schau dir mal die Eigenschaft NumGlyphs an. Da kannst du festlegen, wie viele Bilder dein Bitmap enthält, was du als Glyph übergeben hast. Das erste wird für das normale Bild genommen, das zweite für disabled. Oder so. Genaueres steht in der Hilfe dazu.

Normalerweise sollte der aber bei NumGlyphs=1 automatisch eine ausgegraute Version des Bildes nehmen. Bei einigen kann das wohl schief gehen. Aber wenn man das explizit setzt, sollte das gehen.

_________________
We are, we were and will not be.
LorenzS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128

MS-DOS, WIN 7, WIN 10
BP7.0, D3, D5
BeitragVerfasst: Sa 22.12.07 12:11 
Die lösung steht in der Hilfe in delphi.
das Graph mus auf 3-4 bilden bestehen,
Erstes Bild Nicht gedrückt
Zweites Bild Deaktiviert
Drittes Bild Gedrückt

Wenn in einem Bitmap mehrere Bilder enthalten sind, müssen Sie ihre Anzahl in der Eigenschaft NumGlyphs angeben. Alle Bilder müssen gleich groß sein und nebeneinander liegen.
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Sa 22.12.07 12:19 
@LorenzS - Visible ist uninteressant, da der ganze Button dann verschwindet.
@Kroko - Mit SpeedButtons hab ich bis jetzt noch nicht so viel gemaacht. Schau mir das evt mal an.
@Gausi und LorenzS(2) - wie kann ich denn mehrere Bilder laden? Wenn ich mein Bild bei Glyph lade, ist NumGlyphs automatisch immer 1


@Kroko - Hab das jetz mal mit nem SpeedButton versucht, aber da ist das gleiche Prob :-(

MfG


Zuletzt bearbeitet von OliverN_26 am Sa 22.12.07 12:22, insgesamt 1-mal bearbeitet
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: Sa 22.12.07 12:21 
Weise Glyph ein größeres Bild zu und setze die Anzahl hinterher entsprechend neu. Sollte eigentlich funktionieren :niuxweiss:

_________________
We are, we were and will not be.
LorenzS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128

MS-DOS, WIN 7, WIN 10
BP7.0, D3, D5
BeitragVerfasst: Sa 22.12.07 12:23 
user profile iconLorenzS hat folgendes geschrieben:
... Alle Bilder müssen gleich groß sein und nebeneinander liegen.

in einem bild
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Sa 22.12.07 12:32 
Ihr seid die geilsten ...

Selbe Bild daneben gesetzt, farblich bissl bearbeitet und ... alles geil :-)

Danke.

Frohes Fest und guten Rutsch