Rich Text Box padding between text and border

前端 未结 11 2175
我在风中等你
我在风中等你 2021-02-02 10:48

Is it possible to add padding into a Rich Text Box control between the text and the border?

I tried docking a rich text box inside of a panel, with its padding for all f

11条回答
  •  爱一瞬间的悲伤
    2021-02-02 11:02

    Perhaps you are looking to indent text? Like left and right indent? If so, then you could just use ReGEtIndent and ReSetIndent methods of the rtf object.

    Here what I do:

    //first I find the length of the active window
    
    nLen := REGEtIndent( ::oActive:hWnd )    
    //now resetIndents of the rtf control    
    RESetIndent( ::oActive:hWnd, nLen[ 1 ] + 100, nLen[ 2 ] + 100, -25 )
    

    Hope that helps.

提交回复
热议问题