how to create clickable elipsis at Windows Mobile Application

how do I create a label to be ellipsis that is if the text length is greater than the length of the container label will arise … which if clicked will issue the entire text

at first enter this function in your program:

public static void LabelWrap (LinkLabel LBL)
Graphics g = FindRoot (LBL). CreateGraphics ();
LabelWrap (LBL, g);

public static void LabelWrap (LinkLabel LBL, Graphics g)
string text = lbl.Text;
textWidth int = Convert.ToInt32 (Math.Ceiling (g.MeasureString (text + “”, lbl.Font). Width));
if (textWidth> lbl.Width)
text.Substring lbl.Text = (0, (lbl.Width * text.Length / textWidth) – 3) + “…”;
_fullText [IndexControl (LBL)] = text;
lbl.Click + = new EventHandler (PDALogic.lbl_Click);
else if (_fullText.ContainsKey (IndexControl (LBL)))
_fullText.Remove (IndexControl (LBL));

then each time you fill your linklabel with a text call

LabelWrap (nama_LinkLabel);

to make it into ellipsis


Tags: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: