I use common button images throughout my application so I thought the GDIPPictureContainer would be a great idea to manage them.
I'm trying to implement it for setting the button images for a LargeButtonItem on a poly list. The Button on this item does not have image name properties for the up/down buttons (which would be useful) so I can't just select the image from the container drop down or set the name at run time.
I'm trying this which compiles but doesn't actually do anything. I just get a default image (two down arrows).
TLargeButtonedItem *button = (TLargeButtonedItem *) AdvVerticalPolyListDialog->AddItem(__classid(TLargeButtonedItem));
TAdvGDIPPicture *picture = DataModuleGlobal->GDIPPictureContainerMain->FindPicture(buttonImageName);
button->ButtonImageDown->Assign(picture);
button->ButtonImageUp->Assign(picture);
The image name is definitely correct because if I set
button->ImageName then the image appears (not on the button but next to it)
The other problem I have is I want to be able to click on the caption/description to also act the same as if the user clicked the button. I though the ItemClick event would do this but it is not being called.
Can you please suggest the correct way to address these issues?
Regards
Adam