
Ergebnis 1 bis 4 von 4
-
Bin neu hier
- 18.04.2011, 21:16
- #1
Hallo Leute
Gibt es für so ne situation eigentlich eine nicht so umständliche Alternative? Mir ist da auf die schnelle nichts anderes eingefallen (Ausgenommen Listbox).
MFG
[FONT=Consolas][FONT=Consolas][FONT=Consolas]Public[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Class[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]MainPage[/FONT][/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]Public[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] box_Nr [/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]As[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Integer[/FONT][/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]Private[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Sub[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] Deselect(boxNr [/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]As[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Integer[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas])[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]' Alle buttons Deselektieren bis auf den ausgewählten[/FONT][/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]Select[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Case[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] boxNr[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]Case[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] 1[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas] CheckBox1.IsChecked = True[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox2.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox3.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox4.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox5.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]boxNr = 0[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]Case[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] 2[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox1.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox2.IsChecked = True[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox3.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox4.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]CheckBox5.IsChecked = False[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas]boxNr = 0[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]' USW bis Case 5[/FONT][/FONT][/FONT]
[FONT=Consolas] [FONT=Consolas][FONT=Consolas][FONT=Consolas]End[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Select[/FONT][/FONT][/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas][FONT=Consolas]End[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Sub[/FONT][/FONT][/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas][FONT=Consolas]Private[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Sub[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] CheckBox1_Checked(sender [/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]As[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] System.[/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Object[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas], e As [/FONT][/FONT][FONT=Consolas][FONT=Consolas]System.Windows.[/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]RoutedEventArgs[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]) [/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Handles[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]_ CheckBox1.Checked[/FONT][/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas] Deselect(1)[/FONT][/FONT]
[FONT=Consolas][FONT=Consolas][FONT=Consolas]End[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]Sub[/FONT][/FONT][/FONT]
' USW bis Listbox 5
[FONT=Consolas][FONT=Consolas][FONT=Consolas]EndClass[/FONT][/FONT][/FONT]
[/FONT]
[FONT=Consolas][/FONT]
[FONT=Consolas]
[/FONT]
-
Bin neu hier
- 19.04.2011, 05:10
- #2
Hallo,
Setze am Anfang vom Sub alle Checkboxen auf False, und dann bei Case nur noch die jeweilige Checkbox auf True.
Gruss,
Uwe
Sent from my OMNIA7 using Board Express
-
Gehöre zum Inventar
- 19.04.2011, 15:20
- #3
Wobei mir die Idee statt Radiobuttons Checkboxen mit dem Verhalten von Radio-Buttons zu verwenden so überhaupt nicht gefällt - immerhin kann der User normal bei den Steuerelementen ja schon durch deren Aussehen auf die Funktion schließen => potentielle Verwirrung wenn dann Checkboxen sich wie Radio-Buttons verhalten.
Ansonsten ist die von Uwe genannte Variante tatsächlich die vom Programmcode her kürzeste.
-
Bin neu hier
- 19.04.2011, 16:41
- #4
OK danke für eure Hilfe, ist ja nur ein kleines projekt für mich selber^^
Ähnliche Themen
-
CheckBox binding oder setValue / ComboBox
Von Cr3dos im Forum Windows Phone 7 EntwicklungAntworten: 7Letzter Beitrag: 03.04.2011, 12:22 -
Ersatz für HD2?
Von linali76 im Forum HTC HD2 SonstigesAntworten: 2Letzter Beitrag: 02.07.2010, 13:44 -
Ersatz Akku für HD 2
Von Unregistriert im Forum HTC HD2 SonstigesAntworten: 1Letzter Beitrag: 07.04.2010, 01:44 -
Ersatz für S2U
Von qvert im Forum HTC Touch DiamondAntworten: 2Letzter Beitrag: 31.07.2009, 14:45
Pixel 10 Serie mit Problemen:...