ContainerCellProperties Example for Visual Basic
LEADRasterContainerViewer.EnableMethodErrors = True
Dim raster As New LEADRaster
Dim rasterio As New LEADRasterIO
Dim MedicalSuiteKey As String
MedicalSuiteKey = "" 'Make sure to specify the right key
raster.UnlockSupport L_SUPPORT_MEDICAL, MedicalSuiteKey
' Load IMAGE3.dic from LEAD Technologies setup directory
rasterio.Load raster, "C:\LEAD Technologies, Inc\LEADTOOLS14\Images\IMAGE3.dic", 0, 0, -1
' Insert a new cell at the end of the container cell queue.
Dim iCellIndex As Integer
iCellIndex = LEADRasterContainerViewer.InsertCell (-1, 0)
' Attach the loaded raster to the newly inserted cell.
LEADRasterContainerViewer.Cell (iCellIndex).InsertBitmapList raster, True, 0
' Change the number of rows and cols to show all the inserted cells.
Dim ContainerViewerProps As New LEADContainerViewerProperties
'Set Container properties
LEADRasterContainerViewer.GetContainerProperties ContainerViewerProps, 0
ContainerViewerProps.IncludedParameters = CONVIEW_CIP_ALL
ContainerViewerProps.RowCount = 4
ContainerViewerProps.ColumnCount = 8
ContainerViewerProps.EmptyCellBackGroundColor = RGB(0, 0, 0)
ContainerViewerProps.BackGroundColor = RGB(0, 0, 255)
ContainerViewerProps.TextColor = RGB(0, 255, 0)
ContainerViewerProps.ShadowColor = RGB(255, 255, 255)
ContainerViewerProps.RulerInColor = RGB(0, 255, 255)
ContainerViewerProps.RulerOutColor = RGB(255, 0, 255)
ContainerViewerProps.ActiveCellBorderColor = RGB(0, 255, 0)
ContainerViewerProps.NonActiveCellBorderColor = RGB(255, 255, 255)
ContainerViewerProps.ActiveSubCellBorderColor = RGB(255, 255, 0)
ContainerViewerProps.DefaultCursor = LoadPicture("c:\vb\icons\arrows\cross.cur")
ContainerViewerProps.VerticalResizeCursor = LoadPicture("c:\vb\icons\arrows\3dwns.cur ")
ContainerViewerProps.HorizontalResizeCursor = LoadPicture("c:\vb\icons\arrows\beam_l.cur")
ContainerViewerProps.BothResizeCursor = LoadPicture("c:\vb\icons\arrows\busy_m.cur")
ContainerViewerProps.AutoScroll = True
ContainerViewerProps.RulerStyle = CONVIEW_RULERSTYLE_INVERT
ContainerViewerProps.CellMaintenance = CONVIEW_CELLSMAINTENANCE_SIZE
ContainerViewerProps.ShowFreezeText = True
ContainerViewerProps.CellBorderStyle = CONVIEW_PEN_STYLE_SOLID
ContainerViewerProps.TextQuality = CONVIEW_TEXTQUALITY_DEFAULT
'Apply these properties
LEADRasterContainerViewer.SetContainerProperties ContainerViewerProps, 0
LEADRasterContainerViewer.Appearance = CONVIEW_APPEARANCE_THREED
Dim i As Integer
For i = 0 To LEADRasterContainerViewer.Cell Count - 1
' Change the number of sub-rows and sub-cols.
LEADRasterContainerViewer.Cell(i).SubRowCount = 2
LEADRasterContainerViewer.Cell(i).SubColumnCount = 2
'Set cell properties
LEADRasterContainerViewer.Cell(i).EnableChangeOnMove = True
LEADRasterContainerViewer.Cell(i).Individual = True
LEADRasterContainerViewer.Cell(i).IsFit = True
LEADRasterContainerViewer.Cell(i).Select = True
LEADRasterContainerViewer.Cell(i).Freeze = False
LEADRasterContainerViewer.Cell(i).ShowRuler = CONVIEW_SHOWRULER_BOTH
LEADRasterContainerViewer.Cell (i).ShowTags = CONVIEW_SHOWTAGS_SHOW
Next i
LEADRasterContainerViewer.FirstVisibleRow = 0