lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 12-01-2010, 10:22 PM
goldbishop goldbishop is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Posts: 30
Scrolling TextBox

Ok i have done everything i know what to do in OOP. How do i successfully attach a scrollbar into a textbox?

Code:
Quote:
textBoxScrollBar = Turbine.UI.Lotro.ScrollBar();
textBoxScrollBar:SetParent( self );
textBoxScrollBar:SetOrientation( Turbine.UI.Orientation.Vertical );

textBox = Turbine.UI.Lotro.TextBox();
textBox:SetParent( self );
textBox:SetMultiline( true );
textBox:SetReadOnly( true );
textBox:SetPosition( 25, 65 );
textBox:SetSize( 350, 300 );
textBox:SetVerticalScrollBar( self.textBoxScrollBar );
Reply With Quote
  #2  
Unread 12-01-2010, 10:29 PM
D.H1cks's Avatar
D.H1cks D.H1cks is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Posts: 162
Try setting the parent to the textbox after, like this:


Code:
self.textBox = Turbine.UI.Lotro.TextBox();
self.textBox:SetParent( self );
self.textBox:SetMultiline( true );
self.textBox:SetReadOnly( true );
self.textBox:SetPosition( 25, 30 );
self.textBox:SetWidth( 350 );
self.textBox:SetVerticalScrollBar( self.scrollBar )
self.textBox:SetVisible( true );

self.scrollBar:SetParent(self.textBox);
Edit: but be aware of where you set the position of the scrollbar, or you might not see where it went. Start by setting its position to 0,0 to see that it is actually there.

Last edited by D.H1cks : 12-01-2010 at 10:34 PM.
Reply With Quote
  #3  
Unread 12-01-2010, 10:44 PM
goldbishop goldbishop is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Posts: 30
Sweet, ty.

Now it doesnt scroll the text. Is that something that i would manually have to program in?
Reply With Quote
Reply



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
TextBox FocusGained() / FocusLost() events not implemented? Betsiel LotRO Wish List (L) 3 10-06-2010 09:44 PM
Ui problem after book10 - Scrolling error text madusmacus Interface Help (L) 3 09-04-2007 03:51 AM
Scrolling combat text Fisko Interface Requests (L) 1 05-31-2007 01:34 PM


All times are GMT -5. The time now is 10:38 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui