need some help for an editbox
Hey there, i'm new too wow addon dev, i need to make an editbox so my user can copy paste content inside it, i can't find good reference to do this :/
edit : i got it to show and behave allmost like i want but i can't get it to fit the space :/ here is my building function Quote:
|
You can find references by looking in some of these notepad addons
I personally use the below example in my own addons Lua Code:
|
Quote:
a good way to do this is using a scrollframe so the editbox won't grow out of your frame http://wowprogramming.com/docs/widge...SetScrollChild |
hey, thanks for your answers :)
I got it kind of working Lua Code:
but i'm gonna try your solution, looks way better :) |
Quote:
I'm using this example and I'm trying to do a "Submit" form. Basically what happens is a slashcommand brings up the edit box which is populated with the value of one of the variables in the addon. I delete everything and the behavior I'm trying to implement is that by clicking the "Ok" button I would set a new value for that variable (the value to be set to the content of the text field). I'm struggling with this as I don't seem to understand how the "Okay" button has been generated in the first place as it doesn't seem to be part of the code? Any help is appreciated! |
Quote:
In your case it might be easier to just use a StaticPopupDialog, you can reference StaticPopup.lua for more detailed examples Lua Code:
There is also the AceConfig input option if you want more full fledged options Quote:
The "Okay" button there is part of the DialogBox frame template Here is an ugly example using the global variables because apparently I didn't bother making them accessible as keys at that time Lua Code:
|
Thanks,
In my specific use case I'm in need to paste a looooooooong text in there hence why I wanted to use the text frame rather than the Static Popup Dialog I guess. I tried working with your other code example with the "Okay" button but I'm getting some errors in the code, it seems this line is making some fuss: Code:
KethoEditBoxButton:HookScript("OnClick", function(self) Code:
eb:SetScript("OnEscapePressed", function(self) |
All times are GMT -6. The time now is 10:29 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI