State Formatting Sort Order/Priority

[=FF('{0}','VOID')]

Something like that would work if it supported expressions.

Did you tried configuring visible states by giving a state name like Status=New instead of just New?

I think I did but is that relating to the early posts? I was miss explaining myself, my problem was trying to format orders using stats from different state types/groups so there was poit where two formatted states overlapped.
Solved by creating a set of Format states under a single group and added extra state update actions throughout.

I think I’ve coded it to cascade state formats. I mean if one state makes it display bold and the other one makes it display blue it should appear in both bold and blue.

@kendash workds out as gooder way as any;

<color #FFD8D8D8><size 1>{0}</size></color> <color red>VOID</color>

Dont know if you can read size one but I cant see it LOL

FYI size 0 causes a crash.

1 Like

Lol you could set it to same color as background. Then it truly would be invisible.

Did that aswell but background would be different with group, anyway at size 1 its as good as invisible anyway LOL

1 Like

I just took a strong muscle relaxer so I might pass out soon.

Not sure why I just told you that.

1 Like

Set color to transparent #00000000

2 Likes

lol I’m glad I returned to this post and didn’t missed that. so funny.

My streamlined inline inline order state setup;

What would be nice would be a way to ‘align’ these inline ‘formatted state values’ - see below;

I have never used a lengths calculator and not even sure it would work in the format fields but if the amount of spaces between NEW and the price could be set dependent on the length of the price that would be awesome.

If you can use {CALL:X} you can left-pad the prices in a script to make that display look nice. You also need to be sure to use a fixed-width font like Consolas for it to work effectively.

function pad(s,d,l,c) {

  // s : input string
  // d : direction - left or right pad
  // l : length of output string
  // c : pad character (0," ")
  
  // ensure the input is a string, not a number
  s = ''+s+'';
  
  var outstring = "";
  var padding = "";
  
  // build string padding
  padding=Array(l+1).join(c);
  
  // pad the input right or left
  if (d=='right') {
    outstring = (s+padding).substring(0,padding.length);
  } else {
    outstring = (padding+s).slice(0-padding.length);
  }
  return outstring;
}
1 Like

Thanks @QMcKay however script CALL doesn’t seem to work in state formatting


Can you affect the Font being used with something like <font Consolas> or similar?

If not, no amount of padding is going to help, since by default, the font shown in the screenshot is not fixed-width, and you cannot reliably align variable-width fonts.

You can :smile:

1 Like

@JTRTech how you managed to do this format?
Can you share ?

Order state formatting;

Read the topic :stuck_out_tongue:

If you have specific question please ask :smile:

I know about this format, I fixed it succefully

i was asking for the small letters HOLD, New etc