Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334588 - [client][editor] API to Hide/show scroll bar
Summary: [client][editor] API to Hide/show scroll bar
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M1   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-17 16:46 EST by Felipe Heidrich CLA
Modified: 2011-12-07 15:44 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2011-01-17 16:46:58 EST
I am using the following 2 lines of code to control the editor's show/hide scroll bar , which is hacky.

editor._editorDiv.style.overflow = "auto";
editor.redrawLines();

A better way to do so is that we should have an API from editor tht can hide/show the scroll bar instead of changing the editor._editorDiv.style.overflow  directly from the caller.
Comment 1 Felipe Heidrich CLA 2011-01-17 16:48:39 EST
Silenio, can't this be done already using the CSS for the editor ?

does Libing need to change this dynamically ?
Comment 2 Silenio Quarti CLA 2011-01-19 10:37:29 EST
(In reply to comment #1)
> Silenio, can't this be done already using the CSS for the editor ?

Yes, it can be done at creation time by providing the stylesheet option with a definition for the "editor" CSS class.  By the way, we need to document the support CSS classes (editorContainer, editor, editorContent, editorLeftRuler and editorRightRuler) some where in the JSdoc.

> does Libing need to change this dynamically ?

Yes, he needs to change it dynamically. He is using to hide the scroll bars while the collapsing/expanding the outline with animation.
Comment 3 Felipe Heidrich CLA 2011-12-05 16:38:09 EST
This can be done changing the css style using the new setOption () and the TextViewOptions.themeClass

Is solution okay ? Please reopen if you need better support.
Thanks.