473,473 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Make a Label Shrinkable

Sl1ver
196 New Member
Hi guys
I've got an app and if its minimized my label will be too long therefore going over my textbox.

Question
How do i make the label so that if the program "shrinks" then the label will shorten followed by three dots
e.g Search Location
And when the app is shrunk maybe look like this
e.g Search Lo...

Any Help would be much appreciated
Jun 12 '09 #1
4 2033
cloud255
427 Recognized Expert Contributor
@Sl1ver
When your application gets minimized no controls will be visible, all that you can see is the form title in the task bar of windows.
I don't understand how you can see textboxes and labels in a mimimized application and when the window is restored all controls will appear exactly as they did before the mimimize unless you programmed it to change the appearance of the form.
Jun 12 '09 #2
Plater
7,872 Recognized Expert Expert
If you meant they overlap when resizing, take a look at the Dock and Anchor properties.
(And if you are using .NET3.0+ I think there are auto-shrink / auto-grow properties as well)
Jun 12 '09 #3
tlhintoq
3,525 Recognized Expert Specialist
@Sl1ver
Since you wouldn't be able to see the label or the text box with the app truly minimized (just a button on the Start bar) I'm going to guess that *your* minimized is a really a smaller version of the form. Kind of like mini-player view of a media playing app only has 'play,pause' instead of the full control set.
How do i make the label so that if the program "shrinks" then the label will shorten followed by three dots
On the Resize event check the width of the form and react accordingly.

Expand|Select|Wrap|Line Numbers
  1. if (MyForm.Width < 200)
  2. {
  3.    myLable.text = myVariable.substring(0,20) + "[...]";
  4. }
  5. else  myLable.text = myVariable;
  6.  
Jun 12 '09 #4
Sl1ver
196 New Member
I got a bad way of explaining stuff, you seem to understand me and give helpfull feedback. Thanx tlhintoq, much appreciated
Jun 17 '09 #5

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

Similar topics

8
by: Susan Bricker | last post by:
Is there a way to change the background color of command buttons? I know that I saw some VBA code somewhere that showed how to do this. I think it involved making the button transparent and then...
3
by: Ignacio Domínguez | last post by:
Hi there. I know I can make a form transparent by setting the transparent color, opacity, etc. Is there a way of making the background of a label and the background of a picturebox transparent...
5
by: malcolm | last post by:
I'm trying to make a combo box custom control (Windows Forms .NET 1.1 c#) that can behave like a label programatically at run time. This is actually a strong feature request by our customers. I...
13
by: Lighting_dragon | last post by:
I try to make an array of label as this. Dim ArrLabel(10) as System.Windows.Forms.Label For i =0 to 10 ArrLabel(i) = New System.Windows.Forms.Label ArrLabel(i).Left=25 ArrLabel(i).Top=25*i...
16
by: Miguel Dias Moura | last post by:
Hello, i have 5 panels in an ASP.net / VB page. The panel 1 is visible the other 4 are NOT visible. I also have 5 images: image 1, image 2, ..., image5. When i click one of the images,...
1
by: chris_huh | last post by:
Using the Label Wezard you can easily make labels for all the records in the table, but is there a way to make just one. I have a form that shows the data from a single recordset and on that...
12
deephill
by: deephill | last post by:
hi i need form dependency. Can u check below code? <p>1. Are you married?</p> <p>
8
by: Alexey Smirnov | last post by:
How to make bold part of the text in a Windows.Forms.Label? Thank you.
1
by: mlshoats | last post by:
Hello I am trying to make a log to track questions i answer on little hardware problems. I got most of it working but I am very new to programming anything and just started picking up things. I am...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.