Dialog initially without scrollbar
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Dialog initially without scrollbar
Hi,
I have a dialog that contains a lot of content so it should have a scrollbar. But initially there is no scrollbar. When I resize the dialog (explicitly or by resizing the browser window) the scrollbar appears. Also when I perform the action again (the dialog is a member).
Hier is the code of my minimized sample:
My workaround is to make the dialog resizable so the user can reszie it and let the scrollbar appear. But I'd prefer the scroll bar to be thare right at the beginning. Any suggestions how to achieve that?
Thanks and regards,
Patrik
I have a dialog that contains a lot of content so it should have a scrollbar. But initially there is no scrollbar. When I resize the dialog (explicitly or by resizing the browser window) the scrollbar appears. Also when I perform the action again (the dialog is a member).
Hier is the code of my minimized sample:
Code: Select all
DialogTestAction = function (editor) {
sync.actions.AbstractAction.call(this, '');
this.editor = editor;
this.dialog = workspace.createDialog();
};
DialogTestAction.prototype = Object.create(sync.actions.AbstractAction.prototype);
DialogTestAction.prototype.constructor = DialogTestAction;
DialogTestAction.prototype.getDisplayName = function () {
return 'Dialog-Test';
};
DialogTestAction.prototype.actionPerformed = function (callback) {
this.dialog.setTitle('Ergebnis');
this.dialog.getElement().innerHTML = '<p style="min-width: 200px">';
for (i = 0; i < 30; i++) {
this.dialog.getElement().innerHTML += 'Test Test Test<br/>';
}
this.dialog.getElement().innerHTML += '</p>';
this.dialog.show();
this.dialog.focus();
};
Thanks and regards,
Patrik
-
- Posts: 78
- Joined: Wed Jul 20, 2016 8:22 am
Re: Dialog initially without scrollbar
Post by mihai_coanda »
Hello Patrik,
Thank you for reporting this issue. I have added an internal issue on it.
To work around this issue you could set the dialog's preferred size using the following code snippet: to any values you desire.
Regards,
Michael
Thank you for reporting this issue. I have added an internal issue on it.
To work around this issue you could set the dialog's preferred size using the following code snippet:
Code: Select all
this.dialog.setPreferredSize(300, 500);
Regards,
Michael
Michael
https://www.oxygenxml.com
https://www.oxygenxml.com
Re: Dialog initially without scrollbar
Hi Michael,
thanks for the workaround - although it is not realy working for me since the content is generated dynamically and I can hardly guess any reasonable preferred size. But makingit resizable to the user can "activate" the scrollbar manually will work for now.
Regards,
Patrik
thanks for the workaround - although it is not realy working for me since the content is generated dynamically and I can hardly guess any reasonable preferred size. But makingit resizable to the user can "activate" the scrollbar manually will work for now.
Regards,
Patrik
-
- Posts: 78
- Joined: Wed Jul 20, 2016 8:22 am
Re: Dialog initially without scrollbar
Post by mihai_coanda »
Hi Patrik
As you cannot determine a suitable dialog height you could set a very large height that would force the dialog size recalculation to fit the screen:
This would also enable the dynamic width of the dialog to better fit the content.
Regards,
Michael.
As you cannot determine a suitable dialog height you could set a very large height that would force the dialog size recalculation to fit the screen:
Code: Select all
this.dialog.setPreferredSize(null, 50000);
Regards,
Michael.
Michael
https://www.oxygenxml.com
https://www.oxygenxml.com
Re: Dialog initially without scrollbar
Hi Michael,
thanks, but the content might also be only a single line - which looks very strange on a full-screen-dialog... ;)
But I implemented a simple algorithm to guess if the content is large, and set the preferred hight to null or 10000 depending on that. This works fine!
Regards,
Patrik
thanks, but the content might also be only a single line - which looks very strange on a full-screen-dialog... ;)
But I implemented a simple algorithm to guess if the content is large, and set the preferred hight to null or 10000 depending on that. This works fine!
Regards,
Patrik
-
- Posts: 78
- Joined: Wed Jul 20, 2016 8:22 am
Re: Dialog initially without scrollbar
Post by mihai_coanda »
Hi Patrick,
Glad that you found a solution that best suits your needs.
I will update this thread once the issue is fixed.
Regards,
Michael
Glad that you found a solution that best suits your needs.
I will update this thread once the issue is fixed.
Regards,
Michael
Michael
https://www.oxygenxml.com
https://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service