colorproblem with findshapes and cql

Im using:

corel.Color red = new corel.Color();

red.RGBValue = 0X0000FF;

corelApp.ActivePage.Shapes.FindShapes(null, corel.cdrShapeType.cdrNoShape, true, "@Outline.color == '" + red.ToString() + "'").AddToSelection();

All shapes that i create in code with the color red are found by findshapes, but if i create a shape and set the color in the interface (rightclick with the mouse on a color in the colorbar)

it does not find this shape, although the rgb value is the same for both colors.

if i would use the slower method:

foreach (corel.Shape sGShape in corelApp.ActivePage.Shapes)
{
      if (sGShape.Outline.Color.IsSame(red))
                  sGShape.AddToSelection();
}

i did notice that 

this is the color set by coreldraw interface:

 corelApp.ActivePage.Shapes.First.Outline.Color {RGB255,USER,255,0,0,100,8273965b-a0fd-4e34-a5c2-a29720146cc3}

and this is the color created in code

+ red {RGB255,USER,255,0,0,100,00000000-0000-0000-0000-000000000000} 

Parents
  • If found a solution "@Outline.color == rgb(" + blue.RGBRed + "," + blue.RGBGreen + "," + blue.RGBBlue + ")"

    But i'm not there yet ;-)

    IF i use blue to select it also selects all de guidelines, is there a way to avoid selecting them with findshapes?

    thanks,

    Tom

Reply Children
No Data