HMG4 statusbar icon item disappear
Posted: Sat Feb 19, 2011 8:04 pm
Hi guys,
I have found a problem with STATUSITEM icon. With HMG4 we can add an image with this instruction:
and this work fine, but sometime we can modify "SomeTextHere" with this instruction:
This also works well, but not too much. In fact, the image is lost after this assignment. Enclosed you will find the solution that I propose.
Changes to make (source "statusbar.prg"), you will find marked with "L3W". The code, that I have written, is not very clean, but I preferred to preserve the existing structure to better highlight my intervention.
I have also added the third parameter to "Item method", but I do'nt know if it's a good idea. Now, it could be used in this way:
and for this reason you can add or remove the image.
Best regards
I have found a problem with STATUSITEM icon. With HMG4 we can add an image with this instruction:
Code: Select all
STATUSITEM "SomeTextHere" WIDTH nwidth ICON IconFile
Code: Select all
FormName:StatusBar:Item(nIndex) := "AnotherText"
Changes to make (source "statusbar.prg"), you will find marked with "L3W". The code, that I have written, is not very clean, but I preferred to preserve the existing structure to better highlight my intervention.
I have also added the third parameter to "Item method", but I do'nt know if it's a good idea. Now, it could be used in this way:
Code: Select all
METHOD Item( nIndex, cItemCaption, cIconName )
Best regards