[Ironpython-users] ResourceManagement

Jason Barner necroak at hotmail.com
Thu May 30 18:48:48 CEST 2013

Hello, I have recently stumbled upon IronPython, and have taken quite an interest in getting to know the workings of it. I've got experience with C#, and many other languages so I am quite comfortable with most of the underlying principles of how things work.
I've been tinkering with simple WinForms apps, and have come upon a bit of a snag. In normal C#, (with design view) you can simply drag and drop a toolstrip, insert the "standard" items to it, and it ever so nicely generates a bunch of code for you.
While I have certainly informed myself through Google that PTVS just doesn't support the WYSIWYG designer for WinForms (I see it does for WPF) I haven't let it deter me from fiddling around. I also noticed that SharpDevelop does support the designer for WinForms with python, and can handle the toolstrip issues I am facing now, but I would rather understand the issue I am having rather then just using a tool/designer to spew code out for me...
I've got a few IronPython books, of which I believe only one touches on the issue I have, but I just can't get a good understanding from how they present it...so hopefully one of you fine people can help me out =)

My problem :
In SharpDevelop, when using the standard items on the toolstrip, you are generated this : resources = System.Resources.ResourceManager("Test.MainForm", System.Reflection.Assembly.GetEntryAssembly())
Which allows this to be done : 
 self._newToolStripButton.Image = resources.GetObject("newToolStripButton.Image")

In C#, when doing the same you are generated this : System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
Which allows this :
 this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image")));

These images are provided with visual studios as far as I am aware, but I am just not sure how exactly they are found, and more specifically I cannot get an implementation like this to work with normal IronPython and PTVS.

If anyone has any knowledge on how I can implement this with IronPython with the PTVS setup, I would love to know how it can be done..it would also be highly appreciated to know what exactly the difference is, and some of (if not all) of what exactly is being done for the images to be pulled...
Thanks for your time! 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20130530/9fa67a51/attachment.html>

More information about the Ironpython-users mailing list