HScroll in tree

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

HScroll in tree

I am developing on tree to make it work like a DBGrid, But i run into
problem of HScroll function.
OS:Win XP SP2;
XulRunner:Latest trunck 1.9 alpha
When the width of the tree is set to be smaller than the total width of
columns, the HScrollbar appears, BUT, when i scroll to the right,the cells
are NOT painted and the GetCoordsForCellItem return a wrong result.
I tried to debug the XULRunner, and found the CalcColumnRect in
nsTreeBodyFrame.cpp goes wrong when there is a HScroll(mHorzPosition>0).
This results in PaintCell NOT called in PaintRow.

My Questions Are:
  1. Should mInnerBox.x be always zero even after a HScroll?
  2. Should we change the code in  CalcColumnRect  like
       rect.width = PR_MAX(0, PR_MIN(rect.width, mInnerBox.width - rect.x +
  3. The "X" returned by GetCoordsForCellItem is relative to x1 or x2 after

|<----mHorzPosition------>|<----->|<-----Cell Width----->|<--->|
|<---------------x1-------------->|<-----Cell Width----->|<--->|
|<------------------------|<-x2-->|<-----Cell Width----->|<--->|

Thanks for any hint.

dev-tech-layout mailing list
[hidden email]