Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Floating container
Message
From
27/11/2000 07:34:20
 
 
To
22/11/2000 11:11:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00444638
Message ID:
00445596
Views:
15
Hi, Mike!

2 years ago I made the same functionality fo my grids. It seems you lost normal point of view because complexity of grid control and complexity of task. Really it is simple. You don't need to use MIN() function to position container. You can use the same approach you used for regular rows. You just need to correctly organize sequense of all events for grid:
1. Append blank
2. Refresh grid and set focus to it to scroll it down to show new record.
3. At this point RELATIVEROW property is available for use by the same way as for regular records. You can now use the same approach to position container.

HTH.

>Hi All,
>
>I have a problem with the placement of a floating container over a grid. The purpose of this container is for data entry. Direct entry into the grid is not possible since I require comboboxes that have different elements in the arrays that populate them, depending on other factors in each record. The problem I am having is that when in EDIT mode I use the RELATIVEROW of the grid to know where to place the container. The user just needs to click on the row they want to modify and the container will be placed over that row. And it's appropriate control will get the focus. This is how I do the placement.
>
>.cntreghrs.TOP = .grdreghrs.TOP + 19 + ((.grdreghrs. RELATIVEROW - 1) * .grdreghrs.ROWHEIGHT)
>
>This works great provided I block the scrolling of the grid. If I don't and the user scrolls the RELATIVEROW of the visible portion of the grid the container can tend to float away.
>
>If I am in ADD new record mode. And after my APPEND BLANK. I can place the container with:
>
>.cntreghrs.TOP = .grdreghrs.TOP + 19 + (MIN(13, RECCOUNT('reg_hrs_cursor') - 1) * .grdreghrs.ROWHEIGHT)
>
>Since there are 14 visible rows in the grid I can control where the container will appear by using the MIN() function.
>
>The problem now is. They want to be able to do both Add & Edit at will and there is no distinction between the 2. I am unable to control the placement of the container because I now need 1 calculation. And I'm stumped. Any help is appreciated. By the way. The container is only visible in either of these 2 modes.
>
>TIA
>MIke
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform