Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, May 4, 2006 8:41:35 AM(UTC)
David9908

Groups: Registered
Posts: 18


Hi,

I am a newbie for LEADTOOLS. Is there any sample for using image list control?

My task is to display a group of images in a control (2rows, 4 columns) and could select one of them by mouse click.  

 

 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, May 4, 2006 10:52:49 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Which programming interface are you using (e.g. COM, OCX, .NET,
etc.)?  Also, how do you want to get the images into the control?  Do you want to load specific images or browse a folder?

 
#3 Posted : Thursday, May 4, 2006 11:51:20 AM(UTC)
David9908

Groups: Registered
Posts: 18


Thank you for replay. Now I hands it. the following is my code: 

 

Option Explicit

Dim moRaster As New LEADRaster
Dim moRasterIO As New LEADRasterIO

 

Private Sub Form_Load()

    Dim sImageFiles() As String

    Dim sImagePath As String

    Dim i As Integer

       

    'Using VB CommonDialog open a group of Dicom image file

    With Me.CommonDialog

        .Filter = "All Files *.*|*.*"

        .Flags = cdlOFNAllowMultiselect + cdlOFNExplorer + cdlOFNLongNames

        .ShowOpen

           

        sImageFiles = Split(.FileName, vbNullChar)

    End With

           

    'Load the selected image files into the cells

     For i = 1 To UBound(sImageFiles)

            sImagePath = sImageFiles(0) & _

IIf(Right(sImageFiles(0), 1) <> "\", "\", "") & sImageFiles(i)

            LoadCellFromFile sImagePath, i - 1

        Next i

End Sub

 

Private Sub LoadCellFromFile(ByVal sPathName As String, ByVal nIndex)

    moRasterIO.GetFileInfo(moRaster, sPathName, 0, 0)

    moRasterIO.Load(moRaster, sPathName, 0, 0, -1)

    Me.LEADRasterImgList.Insert moRaster.Bitmap, "", 0

End Sub

Now I know how to set the size of the images in the list, but I don't know how to set the columns per row as a fixed number, say, 4? at this situation may be two scroll bars are need.

 
#4 Posted : Sunday, May 7, 2006 3:09:20 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

There are no properties that can directly set the number of items in a
row or column.  However, you can control that by setting the size
of the image list (Width and Height properties), the item's size
(ItemWidth and ItemHeight properties) and the spacing between items (ItemHorizontalSpacing and ItemVerticalSpacing properties) accordingly.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.149 seconds.