Yeah sure. Just create a slider first and after that editbox under it.
Combine:
local slider = CreateFrame("Slider", "MySlider", nil, "OptionsSliderTemplate")
slider:SetWidth(144)
slider:SetHeight(17)
slider:SetOrientation("HORIZONTAL")
slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal")
slider:SetMinMaxValues(1,100)
slider:SetValueStep(1)
slider:SetValue(1)
slider.tooltipText = 'Set the size of the note'
getglobal(slider:GetName() .. 'Low'):SetText('Left')
getglobal(slider:GetName() .. 'High'):SetText('Right')
getglobal(slider:GetName() .. 'Text'):SetText('Text!')
slider:SetScript("OnValueChanged", function(self, newvalue)
UpdateMySlider()
end)
and
local editbox = CreateFrame("EditBox", "MyEditBox", nil)
editbox:SetPoint("TOP")
editbox:SetPoint("LEFT")
editbox:SetPoint("RIGHT")
editbox:SetHeight(100)
editbox:SetFontObject(GameFontHighlightSmall)
editbox:SetTextInsets(2,2,2,2)
editbox:SetMultiLine(false)
editbox:SetAutoFocus(true)
editbox:SetScript("OnEscapePressed", function()
editbox:ClearFocus()
end)
editbox:SetScript("OnEditFocusLost", function(self) editbox:ClearFocus() end)
editbox:SetScript("OnShow", function(self)
self:SetText("")
self:SetFocus()
end)
Tweak and tune the rest.
|