Discussion:
Display custom image with FormWindowControl
(too old to reply)
Sivert B
2011-03-21 20:56:24 UTC
Permalink
I would like to present an image that I have uploaded as a resource in the AOT in a FormWindowControl that is not connected to any datasource.
I am able to set the image to one of the internal AX images by using this method:
FormWindowControl.imageResource

But how do I load an image that I have added myself to the AOT Resources?
Rudi Hansen
2011-03-22 08:48:00 UTC
Permalink
This article shows how to use an resource image for a button.

http://msdn.microsoft.com/en-us/library/cc621437.aspx

So if your FormWindowControl, is named image, and has AutoDeclaration
set to Yes.
Then the code setting the recource to "CCIcon_ArrowDown" should look
like this.

image.imageName(SysResource::getImagePath("CCIcon_ArrowDown"));

Hope this helps you
Post by Sivert B
I would like to present an image that I have uploaded as a resource in the AOT in a FormWindowControl that is not connected to any datasource.
FormWindowControl.imageResource
But how do I load an image that I have added myself to the AOT Resources?
Sivert B
2011-04-04 08:23:31 UTC
Permalink
Thanks for your reply, Rudi.

Unfortunately your method only works for image resources already available in AX, but not for images that you upload to AX as new resources.

To display custom resource images you need to use the code posted by user "Ba" in this thread:
http://www.eggheadcafe.com/software/aspnet/30776090/displaying-resources.aspx
Loading...