473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How can I display info text in my dialoge form?

I want to display some informational text in a dialog something along
the lines of 'enter your text in the below box and press OK to save, or
Cancel to exit'.

I'm using a textbox to display this is that the right way to do it? The
user doesn't enter text into this, it's just informational so I wasn't
sure if textbox was best?

Problem with the textbox is when the form loads (a) it's highlighted in
blue, and (b) the user can click and get a cursor inside it. I've found
the readonly property but this doesn't stop the cursor from being able
to appear inside the text...

If textbox is the right control to use for this, how do i stop people
from being able to click into the text?

Thanks,

Gary.

Mar 27 '06 #1
6 1972
Hi Gary,

If the text is just for information, and the button choices are limited
to OK and Cancel, why don't you use an InputBox ?

string Result = "";
Result = InputBox("Enter your text in the below box and press OK to
save, or Cancel to exit", "Text Entry", "")
if (Result != "")
{
// Do something with the entered text
}

Mar 27 '06 #2
I tried your solution but it didn't work and generated an error... I
had a look on the internet and apparently there's no inputBox in dot
net =/

Mar 27 '06 #3
I had a look on the internet and apparently there's no inputBox in dot
net =/
This is not strictly true, there is an InputBox function in VB.net, but not
c#

Regards
Scott Blood
C# Developer

<ga********@myway.com> wrote in message
news:11*********************@t31g2000cwb.googlegro ups.com...I tried your solution but it didn't work and generated an error... I
had a look on the internet and apparently there's no inputBox in dot
net =/

Mar 27 '06 #4
For purely informational text, use a label.

Mar 27 '06 #5
Thanks I tried this first but how do i make a label multi line?

Mar 28 '06 #6
Add your text, placing \r\n where you need line breaks. You can also
set AutoSize to false if you want to size the lable manually

Mar 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: JStrauss | last post by:
Hello, Can anybody give me some tips on the best and/or easiest way to display multiple lines in a field. The data is collected from a "textarea" field when the form is submitted, and I want to...
5
by: christian | last post by:
Hi, i'm getting no success, with my attempt displaying some pictures one after another for i.e. some seconds. null.jpg is a white site! Really thanks for any help, regards,Christian
6
by: HartSA | last post by:
Here is the relevent part of my code. I am trying to learn ASP. <body> <table border="0" cellspacing="0" cellpadding="0"> <form name="frmSearch1a" method="get"> <tr> <td align=center>...
2
by: Marc | last post by:
I'm back in the Access development mode and seem to have forgotten how to do 2 things that should be simple. I have a database with a table of contacts, companies and activities. The idea is that...
2
by: Benedict Teoh | last post by:
I created a dropdownlist containing day, month and year field and expose a property to assign a date. When I call from a aspx page and assign the value, the new date is not displayed until a submit...
3
by: UJ | last post by:
I want to display a message to the user that appears to float in front of a window. I could do it with another window but there's no way to make the window itself completely transparent but still...
19
by: 848lu | last post by:
hi, i wanted to display cookie info on a form, as in a text box ok this is what im doing, im saving all info on a cookie where the users types in i.e. card details. and at the end i made a...
0
by: rehanmomin | last post by:
Just to start off, I am writing a web application using C#. I have a Menu which is binded to an XML datasource. There are three menu items each with submenus and a textbox where I want to display...
2
by: giandeo | last post by:
Hello all, It's almost a couple of weeks since i am struggling to get this code work. Unfortunately, i am stuck. There seems to be no hope... Please Help....... I am working with an asp page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.