Results 1 to 7 of 7

Thread: Pictures in flexgrid cells

  1. #1

    Thread Starter
    Junior Member deiva's Avatar
    Join Date
    Mar 2000
    Location
    Penang, Malaysia
    Posts
    29

    Post

    Hi,

    I would like to insert pictures into my flexgrid cells. I cannot seem to figure out how todo it.

    I am used to using MS Grid which is rather simple for doing this. However, since I switched to VB6 and it only has Flexgrid (and no MS Grid), I do not know how to proceed.

    Any help is most appreciated. Thank you.

    Deiva

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Post

    For MSFlexGrid OCX control, you need to used the CellPicture properties:

    Set .CellPicture = Image1.Picture Or
    Set .CellPicture = Picture1.Picture

    Good Luck.

  3. #3

    Thread Starter
    Junior Member deiva's Avatar
    Join Date
    Mar 2000
    Location
    Penang, Malaysia
    Posts
    29

    Post Thank you

    It works, that is fab! Thank you very much.

    Regards,
    Deiva

  4. #4
    Lively Member
    Join Date
    Nov 2002
    Posts
    70
    I'm trying to accomplish the same thing. As I add a row to the grid I'm wanting to set an option button in the first column. I've used your example code but cannot seem to get it to work.

    How can I add a row and set the first cell to equal the option button?
    "never trouble trouble til trouble troubles you"

  5. #5

    Thread Starter
    Junior Member deiva's Avatar
    Join Date
    Mar 2000
    Location
    Penang, Malaysia
    Posts
    29
    Hi Jason,

    I am sorry for the late reply. And I am not sure if you have already got the answer to your question.

    I just wanted to clarify, what do you mean by
    How can I add a row and set the first cell to equal the option button?
    Where is the option button located on the form?

    Best wishes,
    Deiva

  6. #6
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421
    Hi jason,

    Take the picture of the option button, i mean image.

    and whenever u add a row call this statement

    flex1.row=flex1.rows-1
    flex1.col=0
    flex1.cellpicture=loadpicture(C:\opt.gif)

    where flex1 is the name of the flexgrid and "C:\opt.gif" is the path of the option button image.

    I hope u understood.....
    A good friend...

  7. #7
    Lively Member
    Join Date
    Nov 2002
    Posts
    70
    Thanks for replying both of you.

    I have recently found an alternative which I'm satisfied with. I did try using ravi15481 idea just for kicks but could not find the "opt.gif" or any similar file on my computer. Is it under a different name?
    "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
  •  



Click Here to Expand Forum to Full Width