vb.net - Adding rule lines to lines in a text box (multi line) -
does know of way add rule lines multi-line text box control?
i thinking of writers pad style faint blue lines under each line of text, filling entire control. (not underline stuff typed in rich text box.)
just blank large text box looks rather bland. thought out there might know of custom control, or way draw line under each text line.
cheers.
just quick sample threw should started:
public class form1 private g graphics private x long private lineheight long private sub button1_click(sender object, e eventargs) handles button1.click end sub private sub form1_load(sender object, e eventargs) handles me.load g = me.creategraphics() lineheight = 20 end sub private sub form1_paint(sender object, e painteventargs) handles me.paint g.dispose() g = textbox1.creategraphics() counter long = lineheight textbox1.height step lineheight g.drawline(pens.lightblue, 0, counter, textbox1.width, counter) next end sub end class
i'll leave figuring out value of lineheight , how choose draw first line (also, don't forget vertical rule lefthand margin)
hth,
eric
Comments
Post a Comment