19. januar 2003 - 11:04Der er
1 kommentar og 1 løsning
Checke checkboxes
Jeg har otte checkboxes, checkbox1, 2 - 8. Jeg vil gerne have det sådan at der kun kan være én checkbox checked. Dvs. at hvergang jeg trykker på én, skal den checke sig selv og un-checke en af de andre som er checked, sådan at der kun er én checkbox checked. Hvordan gør jeg??
fra hjælpen: A TRadioGroup object is a special group box that contains only radio buttons. Radio buttons that are placed directly in the same control component are said to be “grouped.” When the user checks a radio button, all other radio buttons in its group become unchecked. Hence, two radio buttons on a form can be checked at the same time only if they are placed in separate containers, such as group boxes.
To add radio buttons to a TRadioGroup, edit the Items property in the Object Inspector. Each string in Items makes a radio button appear in the group box with the string as its caption. The value of the ItemIndex property determines which radio button is currently selected.
Du kan sagtens programmere dig ud af det, men det vil være en overtrædelse af Windowsstandarden. En checkbox bruges hvis 0,1 eller flere kan markeres. En radiobutton bruges hvis netop 1 skal markeres
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.