OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28-08-2012, 06:44
Joe Joe is offline
Member
 
Join Date: Nov 2008
Location: Latvia
Posts: 92
Send a message via Skype™ to Joe
Unhappy 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:


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:


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?
Reply With Quote
  #2  
Old 28-08-2012, 11:15
Joe Joe is offline
Member
 
Join Date: Nov 2008
Location: Latvia
Posts: 92
Send a message via Skype™ to Joe
Default

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.
Reply With Quote
  #3  
Old 01-09-2012, 12:59
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default 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
Reply With Quote
  #4  
Old 01-09-2012, 14:33
Joe Joe is offline
Member
 
Join Date: Nov 2008
Location: Latvia
Posts: 92
Send a message via Skype™ to Joe
Default

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.
Reply With Quote
  #5  
Old 09-09-2012, 17:46
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Gradient

Joe,

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

-Shelby
Reply With Quote
Reply

Tags
bug, gradient, problem, vba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
macro causing annoying warning box gorgo Code Critique 2 21-03-2013 09:26
Trapped in GetUserClick - unusual behavior? Joe CorelDRAW/Corel DESIGNER VBA 2 24-05-2012 13:09
web page glitch mmacw General 1 07-11-2008 11:25
Gradient + Break Apart Hernán New product ideas 6 25-04-2004 14:34
Gradient Fill Michael Cervantes Corel Photo-Paint VBA 1 08-04-2004 09:05


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


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