We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jun 2011
    Posts
    0

    Control visible outside of parent!? Please help!

    If I want to display effect- or skill-icons, these icons are always 32x32 pixels, which is too large for some of my applications. Luckily I'm able to scale them down to e.g. 16x16 using SetStretchmode().
    However, using SetStretchMode will apparently result in a bug (?) that the controls are always visible, even when they're outside of their parent control. This can especially become a problem when using scrollable controls such as ListBox where parts of the content in the scrollable control are always outside of their parent control.

    Simple example to demonstrate the issue:
    Code:
    import "Turbine.UI";
    
    window = Turbine.UI.Window();
    window:SetSize(100, 100);
    window:SetBackColor(Turbine.UI.Color(0,0,0));
    window:SetVisible(true);
    
    icon = {};
    for i = 1, 20, 1 do
       icon[i] = Turbine.UI.Control();
       icon[i]:SetParent(window);
       icon[i]:SetSize(32, 32);
       icon[i]:SetBackground(0x4113a302);
       icon[i]:SetStretchMode(1);
       icon[i]:SetSize(16, 16);
       icon[i]:SetPosition(16*(i-1),16*(i-1));
    end

    Does anyone know a solution? Any help would be greatly appreciated!
    Last edited by Eruadarion; Oct 15 2017 at 07:10 AM.
    Eruadarion | Captain | on Gwaihir [EU-DE]
    www.avorthalier.eu

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload