Results 1 to 6 of 6

Thread: VSFlexGrid only picture in column and not text.

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    Craiova, Romania
    Posts
    140

    VSFlexGrid only picture in column and not text.

    I maintain an old application who use vsFlexGrid. Grid is bound to a database and one field display 0 and 1 values. I try to replace this value with picture, so in AfterDataRefresh event i have this code:

    Code:
        With grid
            .Redraw = flexRDNone
            For f = 1 To .Rows - 1
                If .ValueMatrix(f, 2) = 0 Then 
                    .Cell(flexcpPicture, f, 2, f, 2) = imgHandleNOK
                Else
                    .Cell(flexcpPicture, f, 2, f, 2) = imgHandleOK
                End If
                .Cell(flexcpPictureAlignment, f, 2, f, 2) = flexAlignCenterCenter
            Next f
            .Redraw = flexRDDirect
        End With
    ... but grid display image and textvalue from database.
    Name:  2024-03-27_111131.jpg
Views: 139
Size:  44.6 KB

    I can't use
    Code:
    .ColImageList(2) = imgList.hImageList 'handle to an ImageList
    because image are stored in a ImageManager control from Codejock Activex and the control doesn't deliver the handle. I obtain one by one image using this code:
    Code:
        Dim imgHandleOK As StdPicture, imgHandleNOK As StdPicture
        Set imgHandleOK = ImageManager.Icons.GetImage(1, 16).CreatePicture(xtpImageNormal)
        Set imgHandleNOK = ImageManager.Icons.GetImage(2, 16).CreatePicture(xtpImageNormal)
    ...so can i display only image in column?
    Last edited by cliv; Mar 27th, 2024 at 04:36 AM.

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