option button in msflexgrid-VBForums
Results 1 to 4 of 4

Thread: option button in msflexgrid

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    70

    option button in msflexgrid

    Does anyone know how I can add an Option button to each row in an MSFlexgrid? It can be added in the first or last column, doesn't matter.

    preciate it!!!
    "never trouble trouble til trouble troubles you"

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,334

    Well ...

    I think you would need to use the same trick that's used with putting textboxes in the FlexGrid. Of course if you want all the option buttons to be visible all the time, it's a big problem.

    A crude solution would be using a control array of option buttons and locating them on top of the desired cells, by using the Left and Right coordinates of the desired cells. You could also implement a control array that only has as many elements as the visible rows of the grid, and then transfer values back and forth from the grid to the option buttons.

    Alternatively, you could use a third-party grid control that would allow a column type to change from textbox to checkbox or radio button or anything else.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421
    Use images...

    Take two images one with radio button checked and other one unchecked and by default put the unchecked image in all the cells using cellpicture property. and in onclick event change the image to checked one for the current cell and rest all to unchecked.

    This works very fine.....i hope u understood the logic
    A good friend...

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    70
    I understand your logic completely, but I am a little cloudy on what the code would look like!!

    How does the .container property work?
    "never trouble trouble til trouble troubles you"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.