Real Software Forums
http://forums.realsoftware.com/

taking my elaborate windowcontrol and making a class with it
http://forums.realsoftware.com/viewtopic.php?f=20&t=40207
Page 1 of 1

Author:  seanclancy [ Tue Aug 09, 2011 9:53 pm ]
Post subject:  taking my elaborate windowcontrol and making a class with it

Hi there -
I wonder if this can be done?

I have a canvas (It has a guitar as a backdrop) in my window - it also has another canvas inside that canvas which contains 149 canvases at very specific sizes and it's a array called "Notescanvas"

Is there any way to convert that to a class - I want to be able to copy this to any new window and it have the canvas keep their names. Right now, when I copy the main canvas and paste it into another window, I get the notecanvas array calling itself canvas4, canvas5 and not the notescanvas array that it was originally called.

Any ideas?

Author:  classone [ Wed Aug 10, 2011 9:38 am ]
Post subject:  Re: taking my elaborate windowcontrol and making a class wit

Use the "Export Canvas1" menu item (File Menu I believe) and export it as an .rbo class.

Author:  seanclancy [ Wed Aug 10, 2011 6:13 pm ]
Post subject:  Re: taking my elaborate windowcontrol and making a class wit

I clicked on the canvas, no where can I see export as a class in any of the menus

I only get export (window name) as a .rbw file

Author:  classone [ Wed Aug 10, 2011 6:58 pm ]
Post subject:  Re: taking my elaborate windowcontrol and making a class wit

Sorry, I thought you had already subclassed the control. You will need to subclass the canvas control and then you can export that. The export command is under the File Menu.

Author:  seanclancy [ Thu Aug 11, 2011 8:57 am ]
Post subject:  Re: taking my elaborate windowcontrol and making a class wit

Sorry - this whole subject has a big gap in my knowledge (I did did a huge music notation class in VB.net

But I would really like to take the canvas that I made already in a window and turn that into a class object that I can add.

Once I have it as a class I can add all sorts of features that would be an incredibly useful class.

Do I have to make it all again?
If so, do I make it (as a reusable class) - do i use the container control?
Sorry I'm a nwebie at this.

Author:  classone [ Thu Aug 11, 2011 9:10 am ]
Post subject:  Re: taking my elaborate windowcontrol and making a class wit

Add a new class to your project.
Set the new class's super to canvas.
Go to your canvas you previously built and change its super to the new class you have created.
Now make the changes to your canvas class as you need.

BTW - As others have told you in posts you have peppered across this forum, a container control would be a likely candidate for this situation. But I "think" you would need to create your container then drag all of your controls into that container.

Author:  seanclancy [ Thu Aug 11, 2011 10:15 am ]
Post subject:  Re: taking my elaborate windowcontrol and making a class wit

Thanks Classone,

Sorry about the "Peppering" I got more articulate about what it was that I was after as I went along - I'll try not to do it again...
Thanks for the answer :)

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/