Nikolay Sivov wrote:
Changelog:
- try2: fix for several items with a same image case
- implement TCM_REMOVEIMAGE
What about this comment from msdn?
--------- The tab control updates each tab's image index, so each tab remains associated with the same image as before. If a tab is using the image being removed, the tab will be set to have no image. ---------
It implies that indexes should be adjusted if you remove an image somewhere at the front or middle of the image list. Don't see you doing this in your patch.
Vitaliy.
Vitaliy Margolen wrote:
Nikolay Sivov wrote:
Changelog:
- try2: fix for several items with a same image case
- implement TCM_REMOVEIMAGE
What about this comment from msdn?
The tab control updates each tab's image index, so each tab remains associated with the same image as before. If a tab is using the image being removed, the tab will be set to have no image.
It implies that indexes should be adjusted if you remove an image somewhere at the front or middle of the image list. Don't see you doing this in your patch.
Vitaliy.
+ if (infoPtr->items[i].iImage >= image && infoPtr->items[i].iImage-- == image)
This string does it.
Vitaliy Margolen wrote:
Nikolay Sivov wrote:
Changelog:
- try2: fix for several items with a same image case
- implement TCM_REMOVEIMAGE
What about this comment from msdn?
The tab control updates each tab's image index, so each tab remains associated with the same image as before. If a tab is using the image being removed, the tab will be set to have no image.
It implies that indexes should be adjusted if you remove an image somewhere at the front or middle of the image list. Don't see you doing this in your patch.
Vitaliy.
Sorry, you're right. Only works for 0, will resend.