[VB6] 2 Optionbutton Array's in hetzelfde form

Pagina: 1
Acties:

  • Luppie
  • Registratie: September 2001
  • Laatst online: 01-03 23:21

Luppie

www.msxinfo.net

Topicstarter
Ik heb 2 Optionbutton Array's met 4 buttons ieder in hetzelfde form.

Als ik option1(0) aan heb staan en ik klik op option1(1) dan gaat option1(0) uit, hetzelfde geldt voor de rest van dit array.

Tot zover klopt het nog.

Als ik nu een optionbutton van array2 aanklik dan gaat ie van array 1 uit.

Dit wil ik niet, array 1 moet de optie 1,2,3,4 hebben en array 2 moet ook de optie 1,2,3,4 hebben. Het lijkt er nu op dat ie ze gewoon doortelt. 1,2,3,4,5,6,7,8

Wat doe ik fout. Heb op google gezoch en vindt er van alles over optionbuttons, maar ik vindt niks m.b.t. dit probleem.

Heb je iets aan mijn antwoord ? Een thumbs-up wordt zeker op prijs gesteld.


  • Feyd-Rautha
  • Registratie: November 2001
  • Laatst online: 02-08-2025
Kun je iets meer uitleg geven ? Stukjes relevante code enzo ?

I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. Where the fear has gone there will be nothing. Only I will remain.


Verwijderd

Je doet niet zo heel veel fout, alleen moet je weten dat option buttons alleen werken binnen een container. In jouw geval is dat waarschijnlijk een formulier.
Je zal dus eerst een container moeten plaatsen. Bv een picturebox. Daar je option1 array opzetten en een andere picturebox en daar option2 inzetten.

MSDN
Usually, OptionButton controls are used in an option group to display options from which the user selects only one. You group OptionButton controls by drawing them inside a container such as a Frame control, a PictureBox control, or a form. To group OptionButton controls in a Frame or PictureBox, draw the Frame or PictureBox first, and then draw the OptionButton controls inside. All OptionButton controls within the same container act as a single group.

  • Luppie
  • Registratie: September 2001
  • Laatst online: 01-03 23:21

Luppie

www.msxinfo.net

Topicstarter
Perfect, ik heb ze in 2 afzonderlijke frames gezet en het werkt nog ook :)

Was het hele leven maar zo simpel.

Bedankt

Heb je iets aan mijn antwoord ? Een thumbs-up wordt zeker op prijs gesteld.