How to draw on a TPanel

前端 未结 4 1342
陌清茗
陌清茗 2021-01-13 04:35

I need to draw on a TPanel, ideally directly so I don\'t have another component on top of it getting in the way of mousevent-event trapping (I want to draw a little \"size-g

4条回答
  •  广开言路
    2021-01-13 05:13

    This is one of the many many ways that Raize Components can make your life easier. I just go into Delphi, drop on a TRzPanel, and type:

    RzPanel1.Canvas.Rectangle...

    I'm sure there are other solutions - but I don't have to look for them with Raize.

    (just a satisfied customer for about 10 years...)

    EDIT: Given your goal, and your statement that you have Raize Components already, I should also point out that TRzSizePanel handles resizing of the panel and useful events like OnCanResize (to determine whether you want to allow resizing to a particular new width or height).

提交回复
热议问题