Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Jun 21, 2018 9:36 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: I obly like to draw a oval?
PostPosted: Sun Oct 21, 2012 9:03 am 
Offline

Joined: Thu Jul 14, 2011 4:30 pm
Posts: 25
Hello,

i like to make the simple thing: To draw an oval to webpage1.

How does this work?

With a simple:
dim g as Graphics
g.DrawOval(10,10,50,50)
in the sub open() it does not work?

Thanks!

Leffe


Top
 Profile  
Reply with quote  
 Post subject: Re: I obly like to draw a oval?
PostPosted: Sun Oct 21, 2012 10:01 am 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Quote:
dim g as Graphics
g.DrawOval(10,10,50,50)


Where do we start???

dim g as graphics

gets you a pointer to a graphics object.
But there isn't one there, so g is nil

g.DrawOval(10,10,50,50)
will therefore fail.



IF this was a desktop app, and the code g.DrawOval(10,10,50,50) was in the paint event of a control, canvas, or page, then you can expect something to happen. (No need to dim g, because the Paint event gives you a ready made noe)


In a web app (I'm not so sure about this, as I don't use WE.. Its no use to me...) then you don't yet have a paint event of this kind, and there is no canvas control (yet??)
I may be wrong.. (if I am, I'll be buying WE.. the lack of this kind of painting is the main reason its no use to me..)


Top
 Profile  
Reply with quote  
 Post subject: Re: I obly like to draw a oval?
PostPosted: Sun Oct 21, 2012 10:58 am 
Offline
User avatar

Joined: Tue Jan 04, 2011 3:02 am
Posts: 1236
Location: Jönköping, Sweden
Do you need to create it in code?
If you don't you can add a Rectange to your WebPage and then create a Style for it that makes it round.

_________________
Image http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
Xojo Pro 2013r1


Top
 Profile  
Reply with quote  
 Post subject: Re: I obly like to draw a oval?
PostPosted: Mon Oct 22, 2012 2:21 am 
Offline

Joined: Thu Jul 14, 2011 4:30 pm
Posts: 25
Hi,

i need it in the code.

Is something like self.g.drawoval(x,y,w,h) right?

Leffe


Top
 Profile  
Reply with quote  
 Post subject: Re: I obly like to draw a oval?
PostPosted: Thu Dec 13, 2012 6:04 pm 
Offline
Real Software Engineer

Joined: Tue Jul 14, 2009 4:33 pm
Posts: 146
Location: Raleigh, NC
The problem you are having is that there is no "Graphics" object on a web page. If you are using 2012r2, you could use a WebCanvas and draw an oval into that if necessary.

_________________
Greg O'Lone
Software Engineer
Real Software


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group