Archive for October, 2010

how to create clickable elipsis at Windows Mobile Application

October 13, 2010

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

how to install barcode generator in windows

October 13, 2010

at github and googlecode explained how to install barcode generator: it works on linux but failed when the windows and still has not difix: http://code.google.com/p/barcode-generator/issues/detail?id=9

penyeselesaiannya simple fact you also have to install ghostscript (which unfortunately is not written in his github page)

so how to install barcode generator in windows: make sure you have:

* ImageMagick
* GhostScript
* Gbarcode (ruby gem:: gem install gbarcode)

then:

script / plugin install http://barcode-generator.googlecode.com/svn/trunk/barcode_generator

rake barcode_setup

then you can use a barcode generator in your view with

<% = Barcode ‘FJJ4JD’%>