How to create a custom control which can scroll with a fixed row and column?

前端 未结 2 469
生来不讨喜
生来不讨喜 2021-01-05 12:20

I\'m trying to figure out how I can make a custom control in a way where user can scroll in all directions, but with a fixed row and column. A grid is not suitable for what

2条回答
  •  醉梦人生
    2021-01-05 13:01

    The easiest way is to make a control without scrollbars and then put scrollbars over it with fine control of their size and position.

    With Delphi 3-5 you could then encapsulate it as your new control using Custom Containers Pack, and drop onto new forms just like u do with regular grid.

    Since D5 CCP is no more available but limited analogue is given as VCL TFrame. OR you can create those scrollbars in runtime - you need to search for Windows Handle creating routine, (trace TControl.Handle getter method), that might be ReCreateWnd or such, and as GDI handle created - create your scroll-bars over it.

提交回复
热议问题