CTextBox: Fix unselectable textbox of one line

This commit is contained in:
2017-02-05 02:24:48 +01:00
parent 11dab2e63e
commit 6bbfbc2fd4
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,6 @@ namespace CsvView
{ {
public CTextBox() public CTextBox()
{ {
Multiline = true;
WordWrap = false; WordWrap = false;
ScrollBars = ScrollBars.Horizontal; ScrollBars = ScrollBars.Horizontal;
Font = new Font("Courier New", 9, FontStyle.Regular, GraphicsUnit.Point, 0); Font = new Font("Courier New", 9, FontStyle.Regular, GraphicsUnit.Point, 0);

View File

@@ -185,6 +185,7 @@ namespace CsvView
Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right), Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right),
Width = pnlData.Width - Padding, Width = pnlData.Width - Padding,
Height = (valueLines.Length * LineHeight) + TexboxPadding, Height = (valueLines.Length * LineHeight) + TexboxPadding,
Multiline = (valueLines.Length > 1),
Top = y, Top = y,
Left = 0, Left = 0,
ReadOnly = true, ReadOnly = true,