Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior with image in grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01177690
Message ID:
01179103
Views:
15
This message has been marked as the solution to the initial question of the thread.
Let me ask this...

For example... You have a grid with more than 1 column... such as Column 1 is for the graphics button, and columns 2-? contain details for viewer to see.

In Column 1, you want to have different pictures showing based on the content of the record. Ex: Record 1 has a flag to show a "+" sign, Record 2 could have a flag to show a "-" sign, and Record 3 a flag to show a magnifying glass...

However, it is unclear that the proper respective images I've given in the scenario above are showing properly or not... ie: are they all showing the "+" because that is the row you are on??? OR, are they showing properly.

If NOT, do you have 3 distinct graphic controls all added to column 1 (as in this scenario)... and each one of them has their own respective picture. I would look at that first.

Second, do to a possibility of multiple dynamic current controls being possible (ie: each respective graphic control), I would look at your IIF() evaluation for the dynamicCurrentControl setting. I've done this in the past, and actually found it easier to have a column in the table holding which control should be shown to simplify the DynamicCurrentControl...

Instead of something like

=iif( flag=1, "imgPlusSign", iif( flag=2, "imgMinusSign", "imgMagnify" ))

I would just have a column such as ShowControlName, and then

=ShowControlName

Then, in that column you would just have the name of the graphic you wanted to actually show and simplified DynamicCurrentControl setting.

Does this help???

If I'm close, let me know where I'm falling short on understanding your needs.





>>Pictures in grids can be tricky... I've done a variety of experience with this.
>Hi Don,
>I write to you again about the same picture problem. The shortcut now appears as a rule and it is possible to modify the value controlling the picture. The picture change correctly, but... sometimes the same type of picture appears in other random row of the grid. Sparse is Faulse in the column and the value controlling the type of picture is correct. I tried refresh, dynamiccurrentcontrol and other attempts. None of these really refresh the column.
>Can you help me?
>Thanx
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform