Bargraph w/ Label
bcirrisi
Posts: 148
Does anyone know if there is a way to have a bargraph (level) with some text that moves with the on state? I draw a picture of what I want it to kind of look like.
Has this been discussed before?
Thanks,
Has this been discussed before?
Thanks,
0
Comments
I think he wants the percentages to move WITH the bargraph (always in the same position - either on top of the bar or inside it but on top.)
I don't have a panel to try it so I could very well be wrong.
edit: what jjames just posted is a lot simpler, use that instead.
You could always use the absolute text justification command in code.
That command could be triggered by a LEVEL_EVENT.
Just thought of a small problem.
Since percentages are typically at most 3 digits, you'll need to compensate the left alignment when switching to 1 or 2 or 3 digits.
BTW - if it works, gimme your address and I'll send you a bill for my consultation fees. (j/k)
Is this even possible? I remember a while back trying to move things around via code - without luck.
If I remember correctly there is no way to re-position a button or even a popup page on the fly. If this is incorrect I'd love to know how it is done. I run across a lot of situations where this would be handy.
The real tricky part is that the level starts from 0 (at the bottom) and goes to 255 (at the top). The size of the level box was 180pixels and starts at 0 (at the top) and goes to 180 (at the bottom). So the code needed to scale the position from 255 to 180, then move it relatively from the top not the bottom.
As far as your fee jjames, you mis-lead me, I needed the ^JST command not the ^JSB command. I already filed a complaint with the custom service for my money back.
Thanks for the help!
LMAO! Fair enough.
Glad you got it working.
That's a good idea too. I just prefer to manage things in code - much easier to change in my opinion, but that's just me.
Good point . . . I guess he's in line for a FULL refund.
Even if your not interested in how it works, it's fun to keep hitting the test button!
You can change the min and max values of the bargraph in the panel file (programming tab range high and low), or use the ^GLH and ^GLL commands to set them in code (give your bargraph a variable text address)