473,399 Members | 2,478 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,399 software developers and data experts.

Using Parentheses in .NET ToolStripLabel

I am working on a .NET application in C# using Windows.Forms. As part of the application, I have a ToolStrip running across the top to which I have added a ToolStripLabel. Entering most text into the Text property of the ToolStripLabel seems to work just fine.

However, I run into problems when I enter text containing parentheses. For example, if I enter "Benefit Name (Test)" as the text, what is actually displayed is "(Benefit Name (Test".

Does anyone know whether I am doing something wrong (do I need to escape parentheses?) or is this a bug with the control.

Thanks for any assistance.
Tom Murphy
Apr 27 '07 #1
2 1238
SammyB
807 Expert 512MB
Works OK for me
this.toolStripLabel1.Text = "Benefit Name (Test)";
gives Benefit Name(Test) as the text in the control. What version of C# are you using?
Apr 27 '07 #2
Thanks for the reply.

After digging into the issue further and testing with a new test stub program, I figured out that the problem lies in the fact that the ToolStrip was inadvertantly set to RIghtToLeft=Yes.

Once I set this property to "No" and fixed the alignment issues with the ToolStrip components, everything is displaying properly.

Thanks again for you feedback.
Apr 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

44
by: seberino | last post by:
Tuples are defined with regards to parentheses ()'s as everyone knows. This causes confusion for 1 item tuples since (5) can be interpreted as a tuple OR as the number 5 in a mathematical...
28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
6
by: KathyB | last post by:
Hi, I'm passing a parameter to a script, which sometimes fails. However, I discovered that the ones failing had parentheses within the text string, e.g., "Step: Press the (0) on the console." ...
32
by: Mike Machuidel | last post by:
Hi, I'm a game developer programming mostly in C and ASM for about 7 years. Today at work a colleague (a C++ programmer) yelled at me I'm a bad C programmer because I use "return(0);" instead...
4
by: Thelma Lubkin | last post by:
I've inherited code with SELECT statements that look like this one: SELECT tblSales.YEAR As , Count(tblSales.UNITS) As FROM INNER JOIN tblSales ON .STFID = tblSales.STFID WHERE...
16
by: Mark Rae | last post by:
Hi, Supposing I had a string made up of a person's name followed by their profession in parentheses e.g. string strText = "Tiger Woods (golfer)"; and I wanted to extract the portion of the...
3
by: Helen Wheels | last post by:
Can we use parentheses in a check constraint in MS-SQL-server DDL? e.g. I'm having a problem with the following statement: ALTER TABLE . ADD CONSTRAINT CHECK (( IS NULL AND IS NULL) OR (...
12
by: Speed | last post by:
Hi, Could you please tell me what is the simplest code to read a 8-bit grayscale JPEG using C++? Thanks a ton, Speed.
7
by: vlsidesign | last post by:
I am not sure how to think about parentheses. It seems when they are used alongside characters it indicates a function, like addTwoNums(). But is also is used to enforce which operators and...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.