Thread: slider problems
View Single Post
06-01-06, 05:36 PM   #2
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
Lightbulb

Ok, there are two ways to get what you want.

The first is to use the Slider from the Basic tree in the Toolbox. This is just a base slider frame and you can place your min/max labels yourself by putting down Label components where you want and putting in whatever text you want. Whatever you put in the OnValueChanged event will fire when the slider changes.

The second is to use the existing slider component from the Default tree in the Toolbox and write a bit of code in the OnLoad event handler to change the text in the WoW UI itself (but you wouldn't see the change in the editor).
Code:
local minLabel = getglobal("FormName".."SliderName".."Low");
local maxLabel = getglobal("FormName".."SliderName".."High");
minLabel:SetText("0");
maxLabel:SetText("3000");
You can also use the script editor (select the OnValueChanged event, and press the ... button that appears to the right of the property) and select the $parentSlider item in the Sub Frame selector box at the top, any code entered here will execute with the change of the slider itself.

Hope that works for you,
Nulk
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote