wilfred Posted March 24, 2013 Posted March 24, 2013 I have a text field that holds a text of, let's say,17 lines long. When it has more then 10 lines of text, the surplus of that text has to go to another textfield. So I have textfield A that is 10 lines long (holding 10 lines of text) and a textfield B that is also 10 lines long, but holding 7 lines of text. Regardless of the length of a text line. So I don't have 17 Carriage Returns to identify a line. Just 17 lines of text that could have only 3 Carriage Returns. How can you do this? Appreciate your answer in advance. Wilfred (I have FMpro 12 on Mac)
Wim Decorte Posted March 24, 2013 Posted March 24, 2013 aren't the object anchoring options on the layout an option in this case? That way you can make the text object grow when the user makes the window bigger, to display more text. If not then you would probably need to work with the OnSave field trigger. Or perhaps the OnEvaluate. Capturing what fits and what does not fit in the text box can be very tricky. It is going to be a combination of length and counting the # of returns. Keep in mind though that what can be displayed in the text box depends on the font and the font size. So if the user pasts in text in different fonts and different sizes; you will not be able to come up with a calc to cater for all of those. You could choose to strip out all text formatting so that you are always sure what you are working with.
wilfred Posted March 24, 2013 Author Posted March 24, 2013 Thanks for your fast reply. But I don't want to display more text. But it is more that I want to have something like two text columns on a page. If the left one is full the one next to it will be filled with the remainder text. Like you have for instance in PageMaker and other DTP programms. But I understand that this is rather difficult. PS There wil only be one font and size.
bruceR Posted March 25, 2013 Posted March 25, 2013 Don't expect to be able to accomplish this in FileMaker; unless you use complete manual control.
hbrendel Posted March 25, 2013 Posted March 25, 2013 You can make columns with HTML. Maybe this could work using a webviewer. Just a thought.
wilfred Posted March 25, 2013 Author Posted March 25, 2013 Hi Henk, Interesting thought. Is this complicated? Do you know any example file? Thanks for responding.
wilfred Posted March 26, 2013 Author Posted March 26, 2013 I was also thinking ; is there a way to replace soft returns with hard returns? Then I will have a way to control the number of lines I want to show in a field.
LaRetta Posted March 26, 2013 Posted March 26, 2013 What is the reason for wanting this, Wilfred? Will User be typing in the field and then when they soft-return to the next ( 11th ) line it takes them to Field B? Or is this for presentation only and if so, what type of display ( PDF, print, export, preview, etc ). :-)
wilfred Posted March 26, 2013 Author Posted March 26, 2013 This is for presentation uses only. When the information will be printed it has to be able to appear in two columns. Thanks.
wilfred Posted March 26, 2013 Author Posted March 26, 2013 LaRetta I would like to send you an image of what i mean, but I don't know how to do it, because the site won't accept my png file
LaRetta Posted March 26, 2013 Posted March 26, 2013 Check out Layouts > Layout Setup, > Printing and see how it shows printing in two columns? You must zip to attach a file.
wilfred Posted March 26, 2013 Author Posted March 26, 2013 Printing in columns won't do the trick. I have a picture on the left of the page and next to it are two text columns A and B. All the input is in text column A. My thought is that if I can replace the soft carriage returns in column A with hard ones; I can make text column B a calculation field that will hold all the text after hard return number 10. But I don't know the character number of soft returns and I am not even sure if FM uses a soft return when it breaks the sentence to a next line. (I have a zipped file but I do not see an attach file button; so i just dragged it in,, but I am pretty sure it can be that simple) file://localhost/Users/nlcnorthernlightcodesign/Desktop/example.zip
LaRetta Posted March 26, 2013 Posted March 26, 2013 The link you provided will not work. Lee can explain how to get it attached - he has it down to a science and this website does not make it intuitive - the last step should attach the file when you select it but you have to THEN also again say to upload.
Lee Smith Posted March 26, 2013 Posted March 26, 2013 (I have a zipped file but I do not see an attach file button; so i just dragged it in,, but I am pretty sure it can be that simple) file://localhost/Users/nlcnorthernlightcodesign/Desktop/example.zip In order to post an attachment, you have to use the "More Reply Options", not just add a reply below. The steps are as follows: Zip your file that will be attached. It can be a single file or a folder of files. Use the More Reply Options button Use the "Choose File" button Select the file from your Hard Disk. The name of the file should be seen next to that button. Use the "Attach This File" button Add your remarks in the body, and then use the "Add Reply" button. 1
LaRetta Posted March 26, 2013 Posted March 26, 2013 Is there any way to pin this somewhere for easy reference, Lee? With me bouncing between platforms and mobile, I haven't coordinated how to access all my bookmarks from everywhere yet. Your explanation is very helpful. :-)
LaRetta Posted March 26, 2013 Posted March 26, 2013 Thank you, Lee! And thank you Stephen for making it stickie! Hi Wilfred, Here is one way. Actually, I am going to regroup. I just thought of something else.
wilfred Posted March 27, 2013 Author Posted March 27, 2013 Great. I want to create a brochure with on the left a picture of the product and on the right a description. The text column is a calculation field composed of different fields. (The green texts indicates the different fields.) Reason behind that is I want to be able to 'compose' the content of the text. I can now choose which fields I want to appear in the text column. Because the length of the content of the different fields can vary I sometimes need the extra column ( too show text. I hope this makes any sense to you. PS I appreciate all the effort of everybody. example.zip
Lee Smith Posted March 27, 2013 Posted March 27, 2013 Did you do a search for your keywords? I did this Google search and got a few hits site: fmforums.com text overflow I would start with this post by comment http://fmforums.com/forum/topic/77480-field-overflow/?p=363433
wilfred Posted March 28, 2013 Author Posted March 28, 2013 Hi Lee, The ItemsOverflow is exactly the approach i want to have. But not every sentence end with a hard return. So I was thinking if I can replace the soft returns (that determines if a word goes to the next line) with a hard return, I have control over the number of lines that can be in the field. I know that a field can contain for instance 10 lines. But I do not know how to make a calculation that recognizes soft returns and replaces them with hard ones. This is my key question.
Wim Decorte Posted March 28, 2013 Posted March 28, 2013 So I was thinking if I can replace the soft returns (that determines if a word goes to the next line) with a hard return I'm sure there are any soft returns in the text. The text wrapping is done when the layout is rendered, it does not change the underlying data in any way - so there is nothing to find and replace.
LaRetta Posted March 28, 2013 Posted March 28, 2013 (edited) Hello there Wilfred, Here are three ways to pull it off, 1) via layout trickery, 2) by script or 3) by custom function. First two are kludges and the cf doesn't like carriage returns yet. Number of characters wide must be manually determined according to the field width with the existing non-proportional font. There is no reason this cf couldn't adjust to address field-size increase from anchors as well - we have the tools now. I'll see what I can come up with as soon as I get some time otherwise others may have already done something similar. SoftLinesScript.zip Edited March 29, 2013 by LaRetta
LaRetta Posted March 29, 2013 Posted March 29, 2013 I replaced the file by adding the custom function as another alternative (the green fields to the right). It can get off-track sometimes if there are hard returns - will not have time to review it for another few days probably.. But it will be better much than the script.
wilfred Posted April 14, 2013 Author Posted April 14, 2013 Laretta, Sorry for my late response.I've been away for some while. Thanks for your reaction. I will look into it.
Recommended Posts
This topic is 4582 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now