Top Document: Motif FAQ (Part 4 of 9) Previous Document: 95) How can I best add a large piece of text to a scrolled text Next Document: 97) How can I highlight text in the Text widget? See reader questions & answers on this topic! - Help others by sharing your knowledge scrollbars (Sun only)? [Last modified: Nov 97] Answer: Michael Hall <mhall@semy.com> writes: I have found a fix to a bug which is common on SUN platforms. The problem is that the scroll bars on scrolled text widgets are not colored or shaded correctly. scrolledWindowText2 = XtVaCreateManagedWidget("scrolledWindowText2", xmScrolledWindowWidgetClass, form1, XmNscrollBarDisplayPolicy, XmSTATIC, NULL ); runValuesText = XtVaCreateManagedWidget("runValuesText", xmTextWidgetClass, scrolledWindowText2, XmNeditMode, XmMULTI_LINE_EDIT , XmNeditable, FALSE, NULL ); /* workaround a Motif bug - text widget scroll bars are wrong color, and not shaded. */ /* by Michael Hall */ /* just to get background */ junkScroll = XmCreateScrollBar(form1, "junkScroll", NULL, 0); XtVaGetValues(junkScroll, XmNbackground, &junkPixel, NULL); XtVaGetValues(XtParent(runValuesText), XmNchildren, &kids, XmNnumChildren, &numkids, NULL); for (n=0;n<numkids;n++) { if (XmIsScrollBar(kids[n])) { XtVaSetValues(kids[n], XmNbackground, junkPixel, XmNshadowThickness, 30, XmNwidth, 200, XmNheight, 200, NULL); XmChangeColor(kids[n], junkPixel); } } User Contributions:Top Document: Motif FAQ (Part 4 of 9) Previous Document: 95) How can I best add a large piece of text to a scrolled text Next Document: 97) How can I highlight text in the Text widget? Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: kenton@rahul.net (Ken Lee)
Last Update March 27 2014 @ 02:11 PM
|
Comment about this article, ask questions, or add new information about this topic: