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

Word Wrap in CheckBox Text?

12
I know it's possible to wordwrap in a TextBox, but is it possible to do so in a CheckBox? This is a Win Mobile device, and the screen width is quite limited. I need the text wrapped, if longer than the width of the box, rather than truncated.

Is this possible, or am I going to have to create a custom object for this?
Dec 18 '08 #1
4 15423
nukefusion
221 Expert 100+
I don't know if it works the same for the compact framework but in standard winforms if you set the AutoSize property of the checkbox to False and reduce the width of the checkbox the text will wrap vertically in a similar fashion to the label.

Of course if you do that then it won't automatically resize to fit your text if you should change it, so you'd have to be careful or clever if you're implementing localization or if the text is dynamic in some way.
Dec 18 '08 #2
bjwest
12
Thanks nukefusion. I looked all through the compact frameworks CheckBox object and couldn't find anything that would do any kind of autosizeing. The CF is way limited, compared to the standard toolset. I understand they have to save space on the mobile devices, but you'd figure with smart phones being able to switch between portrait and landscape, they'd see the need for this ability. I guess I'm going to have to create a custom object.

The best I can figure is to create an object that contains a CheckBox with no label and a TextBox for the lable. If I set the TextBox to multi line with wordwrap, I can resize it as needed.

Off to the drawing board...
Dec 18 '08 #3
I think We creat a string str = "line1 \n line2 \n line3 ...";
Then checkbox.text = str;
Jan 2 '09 #4
bjwest
12
SaiLove, the CF checkbox does not have a multiline attribute. Anything after a newline is ignored and doesn't show in the textfield.

I got around this by creating my own custom control mentioned above. Right now, I'm trying to figure out how to resize the control when the vertical scrollbar is visible to prevent the horizontal scrollbar from being displayed.

This is a personal project I'm working that I've had to put on hold while developing a database app for the local Veterans Office
Jan 2 '09 #5

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

Similar topics

0
by: Shawn Melton | last post by:
I have tried disabling the automatic word wrap feature in the text editor by going to: Tools/Options/Text Editor/Basic/General and Tools/Options/Text Editor/HTML/XML/General
10
by: Douglas G | last post by:
I've tried various ideas on this problem, but I don't see word wrapping. Can you point out what is wrong? It's a K&R exercise, and I'm still new to programming. Other pointers would be helpful...
1
by: Bernerd | last post by:
Would anyone out there tell me how to make my C# datagrid wrap the text in the cells. I haven't seen a good how to out there that does this. I know it has something to do with using styles but...
10
by: Jeff B. | last post by:
Has anyone come across a decent algorithm for implementing word wrap features in .net printing? I have a small component that uses basic printing techniques (i.e. e.Graphics.DrawString in a...
3
by: Jim Bancroft | last post by:
Hi everyone, This is a silly one I'm sure, but I'm having a whale of a time putting some text into my asp checkbox. Here's what I'd like to do: <asp:CheckBox runat="server"...
3
by: FUGATO | last post by:
I need to help to wrap up text. I have a line all the text and I need to wrap the text with 40 characters each line but without using function. Somebody help me about that and give me an idea
9
by: Joel Byrd | last post by:
I've got a div whose width is specified as a percentage so that if you shrink the browser window, the div shrinks, and the text inside the div wraps around to accommadate this. The problem is:...
10
by: Lorenzo Thurman | last post by:
I have a table cell that I want to wrap text inside of. I've tried both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle the wrap just fine. Does anyone know how I can fix this?
5
by: momo | last post by:
say i have the following table: <table width="500"> <tr> <td width="250">this is the text im concerned with</td> <td></td> </tr> </table> i need the width of the columns to STAY at 250 and...
5
by: zeroblade | last post by:
When I shorten shrink the width of my internet, window how do i make not the text of my website word wrap. The text is in a paragraph tag. Ex. This is the text in the sentence. If I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.