[comp.windows.x.motif] Help: the ScrolledText widget

lfs@d62iggy.mitre.org (Lyman F. Sheats) (02/12/91)

I was wondering if someone could answer a question for me:

I have a Scrolled Text widget with a Form Dialog as a parent.  The resources
I set when I call XmCreateScrolledText are:

  XmNeditable: False
  XmNwordWrap: True
  XmNeditMode: XmMULTI_LINE_EDIT
  XmNcursorPositionVisible: False

The resources set in my .Xdefaults file are:

  !!! width and height resources for Form dialog omitted

  app_name*scrolled_text_widget.scrollHorizontal: false
  app_name*scrolled_text_widget*scrollingPolicy: automatic
  app_name*scrolled_text_widget*scrollBarDisplayPolicy: as_needed

I expected that the scroll bars would only be displayed when the amount of
text in the widget indicated so.  That is, if the amount of text exceeds the
amount that can be displayed in the scrolled text window, the scroll bar will
appear.  Otherwise, the scroll bar will not appear (not enough text in the
widget to warrant one).  Instead, the scroll bar is ALWAYS present.  Am I
missing something?  Any help would be greatly appreciated.  Thanks in advance.

P.S. I'm using X11R3 and Motif 1.0.3

email: lfs@mbunix.mitre.org

nazgul@alfalfa.com (Kee Hinckley) (02/12/91)

> I expected that the scroll bars would only be displayed when the amount of
> text in the widget indicated so.  That is, if the amount of text exceeds the
> amount that can be displayed in the scrolled text window, the scroll bar will
> appear.  Otherwise, the scroll bar will not appear (not enough text in the
> widget to warrant one).  Instead, the scroll bar is ALWAYS present.  Am I
> missing something?  Any help would be greatly appreciated.  Thanks in advance.

Nope.  ScrolledText nicely overrides those resources and forces scrollbars
on all the time.  If you find out how to fix it let me know.