Okay I'm super new in this, so sorry if this is a stupid/badly explained question
So I've got a String Meter - it's text input is variable (i.e. changes automatically from, say, 40 to 60 characters every 5min), meaning that the length of the string changes, too.
What I want is that "X" coordinate is always centered automatically (in regards to other meters), whenever string's length changes?ALL WHILE TEXT REMAINS ALIGNED TO THE LEFT - i.e. if I do "StringAlign=Center", all of the string text gets centred. I assume this would require to put string inside a shape that is always centered while the string inside remains aligned to the left. But then the question is how to adjust the shape's width and/or height automatically in order to match that of the string inside? Something like this, hopefully it makes sense :
It is currently May 8th, 2024, 4:01 am
How to center variable width String Meter?
-
- Posts: 4
- Joined: February 13th, 2023, 2:06 pm
How to center variable width String Meter?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 571
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: How to center variable width String Meter?
Assuming 500 is the position for centering the left-aligned text you have to code on the text-meter a x-position like that:NewStorm wrote: ↑February 20th, 2023, 7:01 pm Okay I'm super new in this, so sorry if this is a stupid/badly explained question
So I've got a String Meter - it's text input is variable (i.e. changes automatically from, say, 40 to 60 characters every 5min), meaning that the length of the string changes, too.
What I want is that "X" coordinate is always centered automatically (in regards to other meters), whenever string's length changes?ALL WHILE TEXT REMAINS ALIGNED TO THE LEFT - i.e. if I do "StringAlign=Center", all of the string text gets centred. I assume this would require to put string inside a shape that is always centered while the string inside remains aligned to the left. But then the question is how to adjust the shape's width and/or height automatically in order to match that of the string inside? Something like this, hopefully it makes sense :
text.jpg
X=(500 - 0.5 * [[#CURRENTSECTION]:W])
edit
Code: Select all
[Meter_To_Center_Left_Aligned]
Meter=STRING
Text=#VARIABLE_WITH_CONTENT#
X=(500 - 0.5 * [[#CURRENTSECTION]:W])
Y=10
StringAlign=LEFT
AntiAlias=1
DynamicVariables=1
-
- Posts: 4
- Joined: February 13th, 2023, 2:06 pm
Re: How to center variable width String Meter?
It worked! Thank you!!
-
- Posts: 571
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria