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 20-07-2011, 07:43
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default Rectangle bug?

Hi.
I'm getting unexpected results with this. I can't seem to get the corners to set how I want them. Can anyone confirm this as a bug in X5?

Code:
Sub Test2222()
    ActiveDocument.Unit = cdrMillimeter
    ActiveLayer.CreateRectangle2 0, 0, 40, 40
    With ActiveShape.Rectangle
        .SetRadius 12
    End With
End Sub
~John
Reply With Quote
  #2  
Old 20-07-2011, 09:46
helpy
Guest
 
Posts: n/a
Default

Try this:
Code:
Sub TestRectangle_SetRadius()
  Dim xUnit As cdrUnit
  Dim oShape As Shape
  
  xUnit = ActiveDocument.Unit
  If xUnit <> cdrMillimeter Then ActiveDocument.Unit = cdrUnit.cdrMillimeter
  
  Set oShape = ActiveLayer.CreateRectangle2(0, 0, 36, 36)
  With oShape.Rectangle
    .RadiusLowerLeft = 12
    .RadiusLowerRight = 12
    .RadiusUpperLeft = 12
    .RadiusUpperRight = 12
  End With
  
  ActiveLayer.CreateRectangle2 40, 0, 36, 36, 12, 12, 12, 12
  
  If xUnit <> cdrMillimeter Then ActiveDocument.Unit = xUnit
End Sub
It seems that .SetRadius does not work!

cu,
guido
Reply With Quote
  #3  
Old 21-07-2011, 06:55
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
At least not with MM...

~John
Reply With Quote
Reply


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
Rectangle Corner roundness vindaa CorelDRAW/Corel DESIGNER VBA 9 16-09-2009 16:58
Resizing rectangle without rescaling julvr CorelDRAW/Corel DESIGNER VBA 2 15-05-2009 08:22
4mm rectangle around the object fungel CorelDRAW/Corel DESIGNER VBA 11 06-03-2009 15:47
Selecting shapes in rectangle area lukswa CorelDRAW/Corel DESIGNER VBA 2 07-10-2008 02:13
Create Rectangle-Shape with positioning WernerHo CorelDRAW/Corel DESIGNER VBA 2 06-02-2008 03:40


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


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