Jump to content


Horizontal Scroll Bar flicker


  • Please log in to reply
1 reply to this topic

#1 eikcam

eikcam
  • Members
  • 23 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 15 June 2013 - 12:54 PM

Situation
Grid on a form that is aligned to client
HideScrollBar set to True

What happends?
Whenever the form is resized, the grid flickers the horizontal scroll bar.

Fix
Original
procedure TNxCustomGridControl.UpdateHorzScrollBar;
...
if ClientHeight > GetSystemMetrics(SM_CXHSCROLL) then
...
end;

Modified
procedure TNxCustomGridControl.UpdateHorzScrollBar;
...
if ClientHeight > GetSystemMetrics(SM_CXHSCROLL) and not (FHideScrollBar) then
...
end;

Result
The horizontal scroll bar no longer flickers. This is due to it not being processed because it is set to hidden. Why process it if its not being displayed?

Regards,

Dan.

#2 eikcam

eikcam
  • Members
  • 23 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 15 June 2013 - 01:10 PM

The above may not actually be a fix as I might have misinterpreted the meaning of the HideScrollBar property. I am now thinking this option is available to hide the scroll bar if the grid is not outside of the available space. Therefore, if the scroll bar is not needed to be displayed then it will not be. My "fix" actually stops all processing of the scroll bar all together if HideScrollBar is checked.

I will re-evaluate and see what I come up with.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users