06-19-17, 08:17 AM | #1 | |
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
Last edited by volchantv : 06-19-17 at 08:40 AM. |
||
06-19-17, 04:39 PM | #2 |
You can find references by looking in some of these notepad addons
I personally use the below example in my own addons Lua Code:
Last edited by Ketho : 06-19-17 at 05:18 PM. |
|
06-19-17, 04:52 PM | #3 | |
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 |
||
06-19-17, 06:21 PM | #4 |
hey, thanks for your answers
I got it kind of working Lua Code:
but i'm gonna try your solution, looks way better |
|
06-11-20, 08:48 AM | #5 | |
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! |
||
06-11-20, 10:17 AM | #6 | |
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
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:
|
||
06-11-20, 07:38 PM | #7 |
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) lootlist = eb:GetText() f:Hide() end) |
|
WoWInterface » Developer Discussions » Lua/XML Help » need some help for an editbox |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|