Display Id and Value

Hi !
I juste downloaded the last version of OSC and i’m already stucked…
I can’t find a way to autmatically display id on top of my widget. I would like if possible, to display the value of the faders.
I tried with a template which should do that, but when converted in last version, the id is not visible too.

anyone has an idea ?

Thanks

Hi,
That’s one of the many documented changes in v1, widgets don’t come with built in label or input fileds anymore. You need to use a text widget or an input widget and synchronize it with your fader (the synchronization mechanism is documented here)

I thought i were going mad. Thanks, it makes sense !

is it going to stay like this…forever ?
I can live with it, now I know how to use a text widget to display a name + value of anothe object… but I must say that it is not very convenient, because :

  • you need to remember the correct syntax to display widget value dynamically @{widgetID.value}
  • if the text object has been created before the slider, the silder will be foreground the text… so you need to know how to z-order them
    css :host{
    z-index:2;
    }
  • it doesn’t looks very nice because of text align / trucation issue : it’s hard to be sure that the value will always be displayed under the name (on another line) so you need to use 2 text widgets
  • if you use another slider+text couple as template by copy/paste … don’t forget to rename text id (!!!) otherwise it’s value can look ok for the moment, but when reloading the project, it will share it’s value with other text widgets (it happens to me all the time ! yes, I know that “paste ID + 1” exist for that… but the shortcut ctrl+V is hard-wired in my brain and in my fingers :grin:

In my humble experience of the past couple of weeks creating interfaces with O.S.C (and really enjoying using it, thanks again !!), I realize now that I spent a looot of time dealing with this simple task : display slider name & value ; so if this (what I think to be a) basic feature could be built in the slider widget, I guess it would save quite a bit of time for many users.

my 0.02 €

1 Like

Yes it’s probably gonna stay like this. A smarter “template” widget implementation is what I’d rather have to solve this (someday…)

You don’t need the .value part but yeah, you definitely gotta remember that one.

if the text object has been created before the slider, the silder will be foreground the text… so you need to know how to z-order them

You can also reorder widgets using the project tree panel. Easier z-ordering is on the think-about list though (currently the last widget in the tree list gets the higher z-index, which makes sense in a web-dev way but doesn’t feel quite intuitive).

Ho i didn’t know that, much easier, thanks :slight_smile:

Menu & keyboard shortcuts for sorting widgets are now implemented and will be available in next release.

Even with a new line (shift + enter) ? For example:

My Fader
@{fader_1}

Haha, never thought about that ! Thanks, much easier this way :smiley: