Yeah those sliding edit texts are cute, but unfortately they are not part of ScriptUI.
As David said, you can stack 2 texts, but that will only have aesthetic effects.
It could be useful to store more digits in the edit texts and display less in the static one for nicer UI (like native sliders do), but this is something one simply never need when scripting...
var w = new Window("palette"); var tt =w.add("group{orientation: 'stack',\ staticT: StaticText{text: '0.0', characters: 8, justify: 'left', visible: true},\ editT: EditText{text: '0.0', characters: 8, justify: 'right', visible: false}\ }"); tt.staticT.onActivate = function(){this.visible=false; this.parent.editT.visible=true;}; tt.editT.onChange=tt.editT.onDeactivate=function(){ var x=parseFloat(this.text) || 0.0; this.text = x.toFixed(3); this.parent.staticT.text = x.toFixed(1); this.visible=false; this.parent.staticT.visible=true; }; w.center(); w.show();
When there is no element to give focus to (like in this example) it is hard to get the static text back if you finally don't change its value...
Xavier