Using the Image Viewer
The LEADTOOLS Image Viewer Control provides support for displaying one or more images and for the real-time manipulation of one or more images.
A container has a number of properties that govern the appearance of the container and the cells, including the number of rows and columns in which cells are viewed. These properties are set by calling SetContainerProperties. Therefore, if the number of rows and columns for a container are both set to 3, there will be 9 areas in which the cells will be viewed. Each two adjacent rows or columns are separated by a thick line called a splitter, which can be moved in order to change the height of the rows or the width of the columns. These splitters may be dragged using the left mouse button. Once the splitter is released in its new position the size and position of the surrounding cells will be adjusted automatically. To get the current properties for a container, call GetContainerProperties.
To the right and to the bottom of the image viewer/container, there are two splitters. These are the extra splitters, which allow the user to change the number of rows and/or columns in the container dynamically. To increase the number of rows or columns, drag an extra splitter over from either the bottom or right side of the container. To decrease the number of rows or columns, drag a splitter currently in the container over to where the extra splitter is currently located. The maximum number of rows and columns allowed in a container is 4 X 8. Once the maximum number of rows or columns has been set in the container, the extra splitter disappears. For example, if the user sets the maximum number of rows in the container, the extra bottom splitter will disappear, indicating that no more rows can be added.
Changing the position of one splitter may affect other splitters, depending on whether the container was set to maintain cell size or maintain cell position. If the container was set to maintain cell size, then if one splitter is moved, the other splitters parallel to it will move the same amount, as long as possible, to maintain the size of the cells.
If the container has been set to maintain cell position, then moving splitters may result in cells of various sizes. To make all cells the same size, call SetContainerProperties for the container, with the number of rows and columns set to the current number of visible rows and columns.
While a container can have a maximum of 4 rows and 8 columns, the number of cells in a container is limited by the amount of available memory. If the container contains more cells than it does blocks in which to display those cells, a vertical scroll bar appears to control which rows of cells to display. You can set or get the first visible row of cells programmatically using the FirstVisibleRow property.
For a list of the properties and methods used to manipulate the container properties, refer to Image Viewer: Container Properties.