문제

I can make TPanel Border as Black by disabling "Ctl3D" and TPanel Border Style as "bsSingle" and TPanel BevelKind as "bkNone" and TPanel BevelInner "bvNone". But my need is to make TPanel Border as "Blue" or "Red". The other way is to "Caliing Form Paint Event" but I do not wish to use it. Please help me.

도움이 되었습니까?

해결책

Your only way to go is:

  1. Study TCustomPanel.Paint code in Vcl.ExtCtrls.pas and
  2. Override it in TPanel (class) to tailor it to your requirement;

You may use a interposer class in the form unit containing your panel.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top