Quantcast How to make a Window resizable - LoTROInterface
Search Downloads

Go Back   LoTROInterface > LotRO > Developer Discussions > Tutorials & Other Helpful Information (L)

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unread 04-22-2013, 07:54 AM
wmrojer wmrojer is offline
The Wary
Join Date: Nov 2012
Location: Sweden
Posts: 4
How to make a Window resizable

Since I see that a lot of plugins does not support rezising of there windows, and I really like to be able to resize them I'm writing a short guide on how to make windows resizable.

The Easy way:

First of the window must be of type Turbine.UI.Lotro.Window

This code is simplified and will not make a working window. It just shows the stuff that needed for the resizing to wrok.
ListWindow = class(Turbine.UI.Lotro.Window);

function ListWindow:Constructor()

	self:SetSize(Settings.listWidth, Settings.listHeight);
       --- Here should be the creation of our child controls

function ListWindow:SizeChanged(args)
	Settings.listWidth, Settings.listHeight = self:GetSize();
        -- Resize our child windows
	self.listTree:SetSize(Settings.listWidth-20,  Settings.listHeight-50);
self:SetMaximumSize(500,1200) defines the largest size we want to allow the window to be resized to.

self:SetMinimumSize(300,1200) defines the smallest size we want to all the window to be resized to.

self:SetResizable(true) is where the magic is. This tells Lotro that the user should be able to resize the window. Mouse pointer will automatically change when positioned over the lower and right border of the window.

function ListWindow:SeizeChanged(args) is where we catch the rezising of the window. Here we need to reposition and resize all our child controls.

It is actually this easy to make a window resizable. The biggest part is the SizeChanged method where we need to resize and reposition our child controls.

Last edited by wmrojer : 04-22-2013 at 08:06 AM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a song using ABC Justin12221 Tutorials & Other Helpful Information (L) 3 11-05-2010 11:09 PM
How to make a Hybrid littlebuddha79 Interface Help (L) 3 03-13-2009 09:49 PM
Resizable health and powerbars and more Passatuner LotRO Wish List (L) 1 02-15-2008 03:34 PM
Resizable and reshapeable minimap Passatuner LotRO Wish List (L) 0 10-04-2007 02:25 PM
Is it possible to make windows resizable? TinMan Interface Requests (L) 1 03-24-2007 09:50 AM

All times are GMT -5. The time now is 05:06 AM.

Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui