Announcement

Collapse
No announcement yet.

Label Size

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Label Size

    hi everyone,

    if Label.GetSize("label").Width > Window.GetSize(DialogEx.GetWndHandle()).Width then
    sNew = String.Mid(Label.GetText("label"), 1, String.Length(Label.GetText("label"))-5);
    Label.SetText("label", sNew.."...");
    end


    Why does not this code ?

  • #2
    what your mean :v

    Comment


    • #3
      string = "lalalalalalalalalalalalalalalalalalalalalalalalal alalalalalalalalalalalaallalalalalalalalalala;"

      if (string ~="") then
      if String.Length(string) > 40 then
      local sNew = String.Left(string, 40).."...";
      Label.SetText(label", sNew);
      else
      Label.SetText("label", string);
      end
      else
      Label.SetText("label", "no info");
      end

      Comment


      • #4
        PHP Code:
        width_use 100; -- size of label
        string_use 
        "PEDO LA LOLI LA LOLI LOLI LOLI PEDO";
        Label.SetText("Label1"string_use);
        while 
        Label.GetSize("Label1").Width width_use do
           
        string_use String.Left(string_useString.Length(string_use) - 1)
           
        Label.SetText("Label1"string_use.."...");
        end 

        Comment


        • #5
          :yes:yes:yes

          Comment

          Working...
          X