Anyone Skin TPlusMemo Successfully?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36793
    standay
    Participant

    Anyone use TPlusMemo Successfully? I can add it to the 3rd party list, and call it a TEdit (the same thing I've seen done to a TMemo). It skins OK but the scrolling doesn't work right. The PlusMemo is not derived from the TMemo. I can scroll the PlusMemo if I move the cursor around within the control, but when I try to move the the PlusMemo scroll position using the sScrollBars it will move and then snap back to wherever the cursor is.

    Just wondering if anyone else has tried this.

    #54518
    Support
    Keymaster

    This control can't be skinned, seems.

    Can you send me or upload here any Exe with this control?

    #54575
    standay
    Participant

    Surprisingly the Pmemo skined OK like the Tmemo and TRichedit do. I could scroll the Pmemo by mousewheel or keys while over/in the text, but when using the scrollbars (both horz and vert), the text would move correctly but as soon as I let up on the mouse it would scroll back to wherever the cursor was. So my guess was it was doing a scrollinview on mouseup which turned out to be right.

    I hate to hack source code so what I did to workaround that was to subclass (I think that's the right term) the Pmemo in my app, and then did this in the MouseUp:

    procedure TPlusMemo.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

    var

    oldDisplayOnly: boolean;

    begin

    if not Form1.sSkinManager1.Active then //no need for a hack if skinning is inactive

    begin

    inherited;

    exit;

    end;

    //hack:

    oldDisplayOnly := DisplayOnly;

    DisplayOnly := Button mbRight;

    inherited;

    DisplayOnly := oldDisplayOnly;

    end;

    I know, pretty ugly hack but it does work and has not seemed to cause any side effects so far and I've been doing a ton of work on my new app with this in it. If I was going to run into something I probably would have by now. Here's a screenshot of the app with the plusmemo internal (yet skinned and working) scrollbars):

    [attachment=7534:skinned.png]

    #54591
    Support
    Keymaster

    Thank you for the information.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.