Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Text Area

Siticone Text Area

The SiticoneTextArea is a dedicated control designed for handling large blocks of multi-line text. Unlike the standard TextBox, it comes pre-configured with a modern aesthetic (borderless, Century Gothic font) and performance optimizations like Double Buffering, making it ideal for log viewers, note-taking applications, and code editors.

Core Configuration

The control inherits from the standard TextBox but overrides specific properties to enforce a "Memo" or "Text Area" behavior by default.

Property Type Description & Default Value
Multiline bool Always True The control overrides this property to ensure it is always in multi-line mode. Attempts to set this to false are ignored.
BorderStyle BorderStyle BorderStyle.None Defaults to no border for a cleaner, modern look suitable for embedding within panels or custom containers.
ScrollBars ScrollBars ScrollBars.Vertical Automatically enables vertical scrolling to handle content overflow.
DoubleBuffered bool True Enables ControlStyles.OptimizedDoubleBuffer to reduce flickering when resizing or repainting the control with large amounts of text.
Font Font Century Gothic, 10pt Sets a clean, geometric sans-serif font by default, providing better legibility for block text than the standard MS Sans Serif.

Dimensions & Sizing

The control enforces specific sizing constraints to ensure usability as a text area.

Property Value Description
Size Size 300, 200 Default starting size, significantly larger than a standard TextBox.
MinimumSize Size 100, 100 Prevents the control from being resized too small to be usable.
Margin Padding 5, 5, 5, 5 Adds standard spacing around the control when placed in FlowLayoutPanels or TableLayoutPanels.

Standard Methods

As it inherits from TextBox, all standard text manipulation methods are available.

AppendText(string)
// Adds text to the end of the current content and scrolls to the caret.
// Ideal for log viewers or chat applications.
siticoneTextArea1.AppendText("[INFO] Operation completed successfully.\r\n");
Clear()
// Removes all text from the text area.
siticoneTextArea1.Clear();
SelectAll()
// Selects all text within the control.
// Useful for "Copy All" functionality.
siticoneTextArea1.SelectAll();
siticoneTextArea1.Copy();

Usage Examples

Example 1: Basic Memo Pad

A simple implementation of a note-taking interface. Because the control has no border, it pairs well with a parent Panel to create custom border styles.

C# - Memo Implementation
private void InitializeMemoPad()
{
                // Container Panel (acts as the border)
                var panel = new Panel();
    panel.Size = new Size(304, 204);
    panel.BackColor = Color.DodgerBlue; // Custom border color
    panel.Padding = new Padding(2); // Border width
    
                // The Text Area
                var textArea = new SiticoneTextArea();
    textArea.Dock = DockStyle.Fill;
    textArea.BackColor = Color.White;
    textArea.ForeColor = Color.DarkSlateGray;
    
                // Add to panel
    panel.Controls.Add(textArea);
    this.Controls.Add(panel);
}

Example 2: Read-Only Log Viewer

Using the SiticoneTextArea as a console output window. The ReadOnly property prevents user editing, while AppendText allows programmatic updates.

C# - Log Viewer
private void SetupLogViewer()
{
    txtLog.ReadOnly = true;
    txtLog.BackColor = Color.FromArgb(30, 30, 30); // Dark background
    txtLog.ForeColor = Color.LimeGreen;        // Hacker style text
    txtLog.Font = new Font("Consolas", 9f);    // Monospace for alignment
}

public void LogMessage(string message, bool isError = false)
{
                string timestamp = DateTime.Now.ToString("HH:mm:ss");
                string prefix = isError ? "[ERROR]" : "[INFO] ";
    
                // AppendText automatically scrolls to the bottom
    txtLog.AppendText($"{timestamp} {prefix} {message}\r\n");
}

Example 3: Dark Mode Editor

Configuring the control for a modern dark-themed code or text editor.

C# - Dark Theme
private void ApplyDarkTheme()
{
                // Background
    siticoneTextArea1.BackColor = Color.FromArgb(45, 45, 48);
    
                // Text
    siticoneTextArea1.ForeColor = Color.Gainsboro;
    
                // Font
    siticoneTextArea1.Font = new Font("Segoe UI", 11f, FontStyle.Regular);
    
                // Remove scrollbars for a cleaner look (if handled externally)
                // or keep them standard
    siticoneTextArea1.ScrollBars = ScrollBars.Vertical;
}