How to add text area from the template when it is not entirely inside one spreadsheet area?

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

I have some template, and there are some totals (which are mostly occupy the area to the right. So there are enough free space to the left. My client wants to put some notification there and it is seems reasonable to add a text area with the desired text inside. The problem that this area would not show until it completely inside spreadsheet area. How could I add this area to resulting document (without defining all the parameters inside the code, I know that this is possible, but what if another client wants a little different text.

Also please do not suggest to split it in 2 columns and show it separately. I have tried this technique and there are a lot of problems when column heights do not match.

The desired template:

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Alexey!

And what if you after the spreadsheet document is generated, programmatically join several cells (depending on the number of rows in your document) and put that text inside that joined cell?

Code
Area = Spreadsheet.Area(2,2,3,3);
Area.Merge();
Area.Text = Constants.UserDefinedFormMessage.Get();

 
#3
People who like this:0Yes/0No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

It will be no user editable. Now I have all templates open to changes, so user can add or modify something. With this approach it will be hard-coded.
There is no way to display it just if there is only left corner inside the area?

 
#4
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Apr 18, 2012
Company:

Hi Alexei.

You can programmatically display text box. In this case the text box always displays regardless of the spreadsheet's size.

Code
TextBox = Spreadsheet.Drawings.Add(SpreadsheetDocumentDrawingType.Text);
TextBox.Text = 
"This
|is
|multiline
|text.";
TextBox.Place(Spreadsheet.Area(Spreadsheet.TableHeight + 1, 1));
TextBox.Top = TextBox.Top + 2;
TextBox.Left = TextBox.Left + 2;
TextBox.Height = 20;
TextBox.Width = 100;

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.