AnsweredAssumed Answered

Width of a field display panel

Question asked by dzittin on Mar 19, 2012
Latest reply on Mar 20, 2012 by philmodjunk


Width of a field display panel


I have a field display and have to limit its phsyical size in a list. Most of the time the field contents is smaller than the panel, but not always.

When field contents exceeds the display panel, I would like a conditional message to appear above the panel telling the user to click on panel, which is a button that causes another panel to pop up showing entire contents of the field.

The problem I have is the logic for the conditional formating. Character count doesn't work because width varies (font=Georgia) even when the count is the same.

I used the following to get the panel length in pixels:

GetValue(Substitute(FieldBounds(Get(FileName);Get(LayoutName);"Tags::TagName"); " "; "¶");3) - GetValue(Substitute(FieldBounds(Get(FileName);Get(LayoutName);"Tags::TagName"); " "; "¶");1)

Is there a function that tells me the field contents width in pixels or any other way to determine that a given contents will not fit a given display panel. FWIW, the display panel is a non-writable edit box.