C# Displaying text in a panel? cut and paste?

Posted on 2007-08-02
Last Modified: 2008-03-10
I have a simple application that has some buttons and a "panel". When the buttons are pressed I want to change (pste) some text into the panel that the user could then cut and paste out. IS a pnel the right thing to use and if so how do I display my strings in the panel.

I tried panel1.setText("Test")

No work. Thanks!
Question by:Karl66
    LVL 18

    Accepted Solution

    Panel is just a container. Use TextBox instead. If you want it to look similar to panel, then change its backColor and BorderStyle

    LVL 21

    Expert Comment

    You have to be more specific - is it a web or windows application?

    Nevertheless for either web or windows, Panel is a container control, your'e supposed to drop controls on it. It even doesn't even have Text or SetText properties.

    As a message display you can use Label or TextBox controls.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now