Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To: Display an Icon is a grid row
Message
From
15/02/2003 12:18:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/02/2003 11:50:00
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00752161
Message ID:
00753722
Views:
25
>Containers? Why not just use an image control. Generally speaking, I do not use containers in grids because there are known anomolies. In this case, I do not see why you need it. Anyway, it is just more overhead.

Lacking horizontal space (there's one grid to the left of this, and there will be one more to the right). So this one will display a few more things below the image - filename and one c(3) field - without introducing additional columns. Just a real estate issue.

>(I'm having the image names in a cursor, which is re-filled when user navigates through another grid, and the cnt_n.image.picture is filled with proper fullpaths in column.refresh)
>
>I am having trouble visualizing what it is that you are trying to accomplish here. Can you give me a short description of the object of the exercise < s >.

Here goes, just for a few mental pushups :). Left grid is a names list. In its ARCC I'm populating a cursor with names of images pertaining to a name; there can be no more than 6-7 images per name. This cursor is used as the recordsource for the images grid, which is refreshed (and the cursor repopulated) for each name in the first grid. There will be a third grid, with a choice of records for the given name where the images will be picked from, and added to this cursor (which is eventually stored via cursortoxml() into a memo in the names table). The whole idea is to a) show which pictures we have for a person, b) add/reorder/remove pictures in this set.

I've actually adjusted this cursor so now it has a field cCtl which holds the name of the container to use, and the
.DynamicCurrentControl=[Iif(Empty(cctl), "text1", Trim(cCtl))]
Additionally, I'm always inserting at least one row into the cursor, with "noimage.jpg" as the image, so it has an image to display at all times. This reduces the appearance of the ugly message to only once, somewhere during the first refresh of the grid. I'll try to insert this dummy record in the grid's init, to see if this cures it.

>So this is a situation where everything would be fine, if only I could trap that message and make it vanish. Did you have anything like this?
>
>Yes. But there is no way to trap for the error that I know of < s >. When it has happened to me, I just found another way to do what I wanted.

>Sorry I can't be more helpful here.

Brainstorming is always better than the ugly weather I'm seeing through the window at the moment :)

Update: prefilling the cursor with the dummy record did it. I'm not getting the message anymore. So this was a sort of situation where your listening helped - see http://home.earthlink.net/~ndragan/pv/emma.html though it doesn't apply completely: the initial trick of having a separate control for each image is something I'd never find out myself).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform