OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: caddman6425 on March 17, 2012, 08:17:47 AM

Title: Changing Images
Post by: caddman6425 on March 17, 2012, 08:17:47 AM
Got a question.  I’ve got a ODCL file and in the file it has a tab strip. On any particular tab are a bunch of choices, how do I change the image of each choice? :-\
Title: Re: Changing Images
Post by: owenwengerd on March 17, 2012, 08:42:47 AM
Quote from: caddman6425 on March 17, 2012, 08:17:47 AM
Got a question.  I’ve got a ODCL file and in the file it has a tab strip. On any particular tab are a bunch of choices, how do I change the image of each choice? :-\

Assuming the images you want are already in the tab control's image list, you can use the (dcl_Control_SetTabImageList) function to change the tab images at runtime. If you meant to ask about doing this in Studio, let me know and I'll move the thread to that group.
Title: Re: Changing Images
Post by: caddman6425 on March 17, 2012, 09:02:10 AM
Owen,
I don't want to change the tab image, but rathar the PIC BOX Image on the individule tab(http://Capture.JPG)
Title: Re: Changing Images
Post by: owenwengerd on March 17, 2012, 04:01:47 PM
There are several different ways. If the image is already loaded in the picture folder, you can set the Picture property:
http://www.opendcl.com/HelpFiles/index.php?page=Reference/Property/Picture.htm (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Property/Picture.htm)

To load one from a file:
http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/PictureBox/LoadPictureFile.htm (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/PictureBox/LoadPictureFile.htm)
Title: Re: Changing Images
Post by: Fred Tomke on March 18, 2012, 08:52:12 AM
Hi, if you're using many pictures I recommend you to use an external picture library (folder with images) and load them at runtime using LoadPictureFile (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/PictureBox/LoadPictureFile.htm) as Owen wrote. I made the experience that too many pictures (97 bmp's in my case) blow up the project file that loading the project file is taking a recognizable time.

Regards, Fred