Changing Images

Started by caddman6425, March 17, 2012, 08:17:47 AM

Previous topic - Next topic

caddman6425

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? :-\

owenwengerd

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.

caddman6425

Owen,
I don't want to change the tab image, but rathar the PIC BOX Image on the individule tab

owenwengerd

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

To load one from a file:
http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/PictureBox/LoadPictureFile.htm

Fred Tomke

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 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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]