Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Schaltflächen abschalten

Empfohlene Antworten

Hi zusammen,

Habe ja schon ein paar Fragen gestellt in letzter Zeit. Jetzt kommt noch eine dazu.

Programmiere das Spiel TicTacToe für die Schule.

Das Spiel ist soweit fertig, jetzt kommen noch kleinigkeiten.

Möchte das das "X" in einer Farbe ist und das "O" in ner anderen.

Jetzt das Problem:

Ich schalte sobald die Schaltfläche benutzt wurde die Enabled Funktion auf False damit die nicht nochmal benutzt werden kann. Nur hat dies den Nachteil das die Farben dann ja nicht mehr berücksichtigt werden.

Kann ich die Schaltflächen noch irgendwie anders unbenutzbar machen so das trotzdem die Farben die ich mit xxx.ForeColor zuweise, verwendet werden?

Danke schonmal im voraus.

Gruß René

Das Einfachste wäre nach dem Abschalten die Farbe nochmal zu setzen.

Was für ein Steuerelement ist es denn?

Ich weiß, dass man bei WPF z.B. einen Triggerstyle für Enable und die Vordergrundfarbe setzen kann.

koppel doch einfach den klickhandler ab, und koppel ihn bei bedarf wieder an.

blaSchaltfläche.Click -= System.EventHandler(blaSchaltfläche_Click);
bzw.
blaSchaltfläche.Click += new System.EventHandler(blaSchaltfläche_Click);

@0815FIA:

Das nimmt er nicht. System.EventHandler ist "Typ" und im angegebenen Kontext nicht vorhanden sagt er.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.