RickB
-
Posts
4 -
Joined
-
Last visited
Posts posted by RickB
-
-
4 minutes ago, Douglas Cogan said:
Hi Rick, you mean, don't wrap text around a picture if the graphic frame is empty, right?
To do this, first give the text frame a name such as "TheTextFrame" in the frame properties dialog box.
Then make a new OnRecordStart rule (or add to one if you have one.)
if (Len(Field("TheGraphic")) == 0)
{
TextFrame = FindTextFrame("TheTextFrame");
TextFrame.textWrap.textWrap =false;
}Replace "TheGraphic" with the name of the field that if empty triggers the text to not wrap. Let me know if this works.
Great! Thank you, I'll give it a shot!
-
3 minutes ago, Dan Korn said:
You can't directly determine when a text frame is empty, but, in OnRecordStart, you can test whether whatever field or rule you're inserting into the frame is empty, and if so, turn off text wrap.
Something like:
if (!Field("YourFieldName")) FindTextFrame("YourFrameName").textWrap = false;
Or, more succinctly:
FindTextFrame("YourFrameName").textWrap = !!Field("YourFieldName");
Thank you, I'll give it a go.
-
Looking to write a rule that would turn off text wrap when empty. Your input is appreciated.
suppress text wrap on graphic frame if empty
in Getting Started, Learning, Etc.
Posted
So yes, text needs to wrap around a graphic frame which I given it a resource file. This code works perfectly with a text wrap but not a graphic frame wrap.