static public xLabel createSingleLabel(string text, int w) { xLabel l = new xLabel(text); l.setSize(w, l.getFont().Height); return(l); }
static public xLabel createSingleLabel(string text) { xLabel l = new xLabel(text); l.setSize(utils.Utils.getStringW(text, l.getControl().Font), l.getFont().Height); return(l); }
static public xLabel createSingleLabel(string text, Font f, int w) { xLabel l = new xLabel(text); if (f != null) { l.setFont(f); } if (w == -1) { w = utils.Utils.getStringW(text, f) + 40; // 40??? don't know why } l.setSize(w, f.Height); return(l); }