Mouse at the left margin in wplayShowManualPageBreaks Layout

  • Hi,

    I added a behavior in my WPRichText similar to the one existent in MSWord. When the user moves the mouse at the left side of the text, it changes the cursor from crIBean to 'Inverted Mouse' which the cursor points to the right, instead of to the left. It was working great, until now, when the user decided to use wplayShowManualPageBreaks Layout.

    Since wplayFullLayout is the most usefull layout, in my opinion, back when it was developed, it was the only one tested, I guess. So, here is the problem.

    I use the code below to check if the mouse is 'at the left side'. X and Y parameters comes from MouseMove/MouseDown:

    Code
    function TMyWPRichText.IsMouseAtLeftSide(x, y: integer): boolean;
    begin
      CalcMousePageAtXY(x, y);
      result := (MouseX + XOffset) < (header.leftMargin - 200);
    end;

    The problem is that header.leftMargin is not usefull at wplayShowManualPageBreaks layout, because since there is no page to see, there is no margin to respect (I guess). So, how could I know the size of the left area (visible)? Which property/value should I use to determine?

    Thanks for your help

    Alessandro Fragnani