Data Access Worldwide Knowledge Base

Article ID 2006
Article Title HOWTO: Workaround Grid Problem on Windows XP
Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2006
KBase Category WINDOWS XP
Date Created 05/07/2004
Last Edit Date 05/07/2004


Article Text
PROBLEM:
The title displayed on the right-hand side corner of dbGrid or Lookup/Selection List disappers when scrolling up-down on XP. This happens with and without using manifest files.

To reproduce:
- Open Order entry view
- Click on the prompt button for Order Number
- Scroll up and down with the mouse until you see the problem in painting the last (right-most) column


SOLUTION:
I implemented a solution which may help. Just put the following augmentation in your dbGrid or its subclass:

    Procedure SetVScrollBox Integer iType Integer iData
        // Pagedown and pageup are sent when the user clicks in the open scrollbar area
        // If they are forward sent, the grid has several painting issues. Instead,
        // I just send scroll in their place.
        If ((iType <> SB_PAGEDOWN) and (iType <> SB_PAGEUP)) Forward Send SetVScrollBox iType iData
        If (iType = SB_PAGEDOWN) Send Scroll 1 0
         Else If (iType = SB_PAGEUP) Send Scroll 0 0
    End_Procedure  // SetVScrollBox

For whatever reason, forward sending in those two cases is what causes the problem.  



Contributed By:
Dalton Pulsipher
email: daltonp@hcss.com


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.