Wordwrap when code more than (x) characters long

SUGGESTED

Hi

I'm looking to create a conditional formatting expression where if a stock code is more than x characters (lets say 10) long, then enable word wrap. I know how to enable word wrap, it is the 'if' part of the expression I am struggling with. Does anyone know if / how this is possible?

Thanks.

  • 0
    SUGGESTED

    ** Update **

    Got it to work this morning  on a product list (Shortened the output of Stock Code to 10 characters)

    The resulting code is below.

    if length(Stock.stock_code) > 9 then
    begin
    WordWrap := True;
    AutoGrow := True;
    end

    In the Advanced Filter you type in "length(Stock.stock_code) > 9" without the quotes. Then inythe Properties tab you set the word wrap and auto grow to True


    Does this answer your question?