Is it possible to replace a table row header for a text in a text list?

joanm
2021-09-28
2021-10-21
  • joanm - 2021-09-28

    Hello all,

    Codesys 3.5 sp15 patch 1.

    I have several tables that are used to fill arrays of structures with values (to configurate a machine parameter set).

    I would like to know if it is possible to replace the table row header (1, 2, 3, 4...) for a text from a text list.

    That way I would be able to set a text the operator would understand.

    I know I could set a string into the structure and show it as the first column, but that struct is used extensively in the code for 6 tables more which don't need that text.

    Moreover, a text list would also be multi-language friendly.

    Summarizing, I would like to replace the table row header numbers for a text in a text list.

    As always, thank you very much for your time and help.

     
  • m.prestel - 2021-10-01

    My bad, I misread your request.

     

    Last edit: m.prestel 2021-10-01
  • dkugler - 2021-10-19
     
    πŸ‘
    1

    Last edit: dkugler 2021-10-19
  • joanm - 2021-10-19

    A label to overlay the table is not a good option as the table has a vertical scroll bar.

    Thanks anyway for your answer dkugler.

     
  • dkugler - 2021-10-19

    I was at the wrong direction! I'm working at the column and they are in the textlist! I searched for my first header and can't find it in the list. After changing it, clean the project etc. it appears there :-) So everything is fine. You are right, a overlay isn't a good idea and will only work, if the table is short enough to be shown completly without a scroll bar!

     
  • jspyker - 2021-10-21

    I've been playing around with tables a bit recently and don't know if what you are trying to do is possible.

    The only workaround I can think of is similar to the string approach you mentioned for the first column. Instead I would add an extra column to the start of your array with numbers corresponding to your textlist. Then in your table properties under the first column tick "use template" and then display the textlist using dynamic texts as usual.

    For the other tables that you don't want to see this info, under table properties you can turn off this column so it is not displayed.

     

Log in to post a comment.