Is there are any possibility to put standard command of spreadsheet document into command bar using a code?
We create some spreadsheet documents in form through code, so we want to add "Page Setup" and "Preview" commands in command bar for those spreadsheet documents.
Thank you for response, but unfortunately it's not what i'm asking about.
I know how to create button using a script. My task is create buttons for predefined commands of spreadsheet document such as "Page Setup" or "Preview".
Unfortunately, adding a standard command in this way is not possible, you need to create a procedure that will execute analog of standard command and assign this action to the button.
Thus it is easier to create a separate form where place attribute of the SpreadsheetDocument type and you will have those buttons available automatically. Same as it was implemented in 1C:Subsystems Library 1.0.
You could open this form sending the generated print form as a parameter with your dynamic buttons.
Does 1C have plans to add such functional in future releases of platform. I mean possibility to assign buttons added by using script with standart commands?
This is not yet clear for me that this feature is useful. Would you please explain use cases with examples? If they will be reasonable, I could submit the feature request for you.
As i wrote above, we are using SL provided by 1C and in case of common form "Printing Documents" where all spreadsheet documents generated dynamically using a script we want to put such commands as "Preview" and "Page Setup" in command bar because it will be useful and clear for users (more useful than in window bar at the top right side).
Why you recommend to do it like it was in SL v1.0 if current version of SL change vision for this mechanism?
So that's why i am asking about this feature because its a huge scope of work to create new PrintingDocuments form and in general we would like to use SL version and update it everytime.
When the form is already opened, its content does not update. To have all print forms opened in separate windows you need to specify the difference between forms by setting the PrintForm parameter as the key parameter. To display the spreadsheet document, simply assign it to the form attribute:
In general i dont understand why you try to push me to create a new form for printforms if we already have a very functional form from SL, which provide much more functionality than you put in your example. And in case of your suggestion we will lose all this functionality. As i told we want to use all functionality from SL form and we need just to have a possibility to add those 2 standard commands for spreadsheet document.
I'm trying to solve your problem. If it is not urgent, I submitted the feature request for you. But I'm afraid it might take a long time for this feature to be developed. If it will be accepted.