Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-07-14, 05:18 PM   #1
Billtopia
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 110
EditBox with line numbers

I was wondering if anyone knows of a way to have line numbers attached to an editbox like in any standard IDE for coding you can have line numbers. I have written an addon called SlashMagic that allows the user to input little scriptlettes and have them turned into slash commands. It has even been updated to allow aliases for the commands now. I am trying to figure out a way to make the built in editor for the lua more IDE like. I looked at _devpad and got a few ideas then all mixed up trying to implement what they did.
I have tried using a scroll frame attached to a seperate frame with a fontstring and editbox attached to the seperate frame and it almost works except as you type the editbox leaves the 'window' of the scroll frame. I even figured out how to measure the strings within the editbox to see if they are wrapped lines or are terminated by <CR>s

Only real problem with this approach seems to be that even though the multiline editbox does grow vertically the backdrop remains the same size, and the editbox can and will leave the screen.


I currently have restored the code on my addon back to a non-scrolling editbox but if someone puts in a long snippet of code the editbox will still go off the screen.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » EditBox with line numbers


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