Skip navigation
Currently Being Moderated

[CS4 Mac] Change PictureWidget image at running time.

Feb 17, 2009 11:02 AM


I have a PictureWidget on a panel - by default it displays a PNG file loaded from resources.

It can also display error icons when a query fails - etc: these icons are loaded from plugin's 'PICT' resources.

So far so good.

Now - when a query doesn't fail it would need to display an image stored as a 'PICT' file on a server: the query result is telling me which 'PICT' file is to be displayed in the PictureWidget.

For QXP I was using DrawPicture() to draw the PicHandle directly in the item rectangle.

Switching it to InDesign - I am looking for a recipe to achieve same result but following InDesign SDK means and spirit.

In other words - how do we change a PictureWidget image at running time in order to display a PICT files from server instead of built-in default PNG or 'PICT' resources.

Any pointer or direction to achieve this would be very much appreciated indeed.

Best regards

Patrick Perroud
  • Currently Being Moderated
    Feb 18, 2009 3:46 AM   in reply to (Patrick_Perroud)
    Take a look at the panel tree view sample - if I remember correctly that can display a preview of a disk file in its panel. Not sure it can handle a pict.

    Mark as:
  • Currently Being Moderated
    Apr 11, 2010 10:23 PM   in reply to IanDBrown



    I have to add a image on a dialog, I am able to add a image on Windows by associating a image resource ID with image path in .rc file. But not able to do the same on mac. How can we associate image resource ID with image path on MAC?





    Thanks in advance.

    Mark as:
  • Currently Being Moderated
    Apr 14, 2010 3:21 PM   in reply to (Patrick_Perroud)

    You may need to have similar resource file called '' file on Mac to store your pictures and use some tools such as Resorcerer to edit it and change all resource id to match with your Window resource ids, then you could do the similar runtime display the pictures etc, even use same code in your window version.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)