private void UpdateBaseTextBox() { if (baseTextBox == null) { return; } baseTextBox.Font = WellsMetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); if (displayIcon) { Point textBoxLocation = new Point(iconSize.Width + 4, 3); if (textBoxIconRight) { textBoxLocation = new Point(3, 3); } baseTextBox.Location = textBoxLocation; baseTextBox.Size = new Size(Width - 7 - iconSize.Width, Height - 6); } else { baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - 6, Height - 6); } }
private void CreateBaseTextBox() { if (baseTextBox != null) { return; } baseTextBox = new PromptedTextBox(); baseTextBox.BorderStyle = BorderStyle.None; baseTextBox.Font = WellsMetroFonts.TextBox(metroTextBoxSize, metroTextBoxWeight); baseTextBox.Location = new Point(3, 3); baseTextBox.Size = new Size(Width - 6, Height - 6); Size = new Size(baseTextBox.Width + 6, baseTextBox.Height + 6); baseTextBox.TabStop = true; //baseTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; Controls.Add(baseTextBox); }