Redraws the item and causes a paint message to be sent to the RasterImageList control that owns this item.
public void Invalidate()Public Sub Invalidate()public:void Invalidate();
You can call Invalidate after you make changes to a certain RasterImageListItem that belongs to a RasterImageList control. Calling Invalidate on the item causes only the portion of the control covered with the item to be invalidated as apposed to invalidating the surface of the entire control.
This example shows how to manually select an item in a RasterImageListItem while updating only the affected area.
Imports Leadtools.WinFormsImports LeadtoolsImports Leadtools.Codecs'''Private Sub SelectImageListItem(ByVal imageList As RasterImageList, ByVal itemIndex As Integer)' Loop through all the items in the listDim i As Integer = 0Do While i < imageList.Items.CountDim item As RasterImageListItem = imageList.Items(i)' If this is not out item and is selected, de-select itIf i <> itemIndex AndAlso item.Selected Thenitem.Selected = False' re-paint only this itemitem.Invalidate()End If' If this is our item and is not selected already, select itIf i = itemIndex AndAlso (Not item.Selected) Thenitem.Selected = True' re-paint only this itemitem.Invalidate()End Ifi += 1LoopEnd Sub
using Leadtools.WinForms;using Leadtools;using Leadtools.Codecs;///private void SelectImageListItem(RasterImageList imageList, int itemIndex){// Loop through all the items in the listfor (int i = 0; i < imageList.Items.Count; i++){RasterImageListItem item = imageList.Items[i];// If this is not out item and is selected, de-select itif (i != itemIndex && item.Selected){item.Selected = false;// re-paint only this itemitem.Invalidate();}// If this is our item and is not selected already, select itif (i == itemIndex && !item.Selected){item.Selected = true;// re-paint only this itemitem.Invalidate();}}}
|
Products |
Support |
Feedback: Invalidate Method - Leadtools.WinForms |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.