ImageGear Professional v18.2 > User Guide > Using ImageGear > Using ImageGear ART Component > Operating with ART Marks > Iterating Through Marks |
Sometimes, your application will need to iterate through the marks in an IGArtPage Object. There are two mechanisms for doing this:
When you use either of these techniques, you must call MarkQuery Method for each mark to place the mark's attributes into the IGArtPage Object.Attr... properties. Your application can then perform the desired function. If the function was to modify the attributes, then your application must call MarkModify Method to apply the new attributes to the mark.
For example, to change the text of all selected marks to red, your application would do the following:
Copy Code
|
|
---|---|
Dim hMark As Long hMark = MarkIndex Dim rgbvals As New IGPixel Set rgbvals = IGCoreCtl1.CreateObject(IG_OBJ_PIXEL) pPage.UserMode = userEditMode pPage.MarkQuery hMark rgbvals.RGB_R = 0 rgbvals.RGB_G = 50 rgbvals.RGB_B = 0 pPage.AttrForeColor = rgbvals pPage.MarkModify hMark pPage.MarkPaint hMark IGPageViewCtl1.UpdateView |