OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Incredibly annoying gradient-related behavior (Possible glitch?) (http://forum.oberonplace.com/showthread.php?t=8363)

Joe 28-08-2012 06:44

Incredibly annoying gradient-related behavior (Possible glitch?)
 
Hi again.

I have been doing some simple gradient-related programming and have run into a super-annoying behavior. This is in X5 for sure (which I use at work) and, I think, in X6 as well.

Easy to duplicate:
Make a shape, such as a rectangle and give it a gradient fill:
http://i244.photobucket.com/albums/g...0/bd99c6ca.png

Now run this simple code:
Code:

Sub Grablem()
    With ActiveSelection.Shapes.First.Fill.Fountain
    .StartX = 0
    End With
End Sub

And then try to give the object another color and this happens:
http://i244.photobucket.com/albums/g...0/0414137c.png

It is as if the gradient node is selected. If you click/create other objects you can escape this, but a new problem pops up - I guess internally Corel just really wants to hold on to that gradient node so object size/position updates get thrown out the window - no matter what you pick the Property Toolbar will show the position/size of the last object you actually manipulated.

This gets even worse if you deal with effects since in their case the toolbar becomes completely useless.

As an added "bonus" this behavior stays with you until you close CD, even in new documents.

Does anyone have any idea how to avoid this?

Joe 28-08-2012 11:15

Btw - could someone please just see if they get the same behavior? Otherwise it is unclear whether it's just on my system or has to do with some other code interoperability.

For what it's worth I just tested and it happens in X6 as well.

shelbym 01-09-2012 12:59

Fountain Fill
 
Joe,

I am confused as to what problem you are seeing. The starting fill node is moved to 0 as expected.

I am using X6, so maybe I am not seeing what you are seeing.

-Shelby

Joe 01-09-2012 14:33

Yes, the node is moved, but what you see in the second screenshot is what happens - the gradient interface actually shows up and sort-of stays "stuck" on that object. Then even if you click somewhere else and back to that object and, for example, click a color swatch expecting to apply a uniform fill the gradient end node color will be changed instead. In essence you are trapped inside the gradient on that object, something one wouldn't expect, especially from running straight-up VBA code.

As mentioned a side effect of this is that the property bar stops refreshing with object sizes and such when you select (or tab between) objects.

I have found a sort-of workaround that helps a bit - adding a S.CreateSelection command to the loop seems to help with the refresh on X6 (but not X5).

So basically the problem is staying trapped inside the gradient in a way. I can make a video if necessary showing the problem.

shelbym 09-09-2012 17:46

Gradient
 
Joe,

I am just not seeing this, are you using Update 1? Or the first release of X6? Thanks,

-Shelby


All times are GMT -5. The time now is 15:00.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com