* Help: Problems with Motif 1.2.4
@ 1996-04-23 4:00 Jay Brack
1996-04-26 4:00 ` Chuck Dillon
0 siblings, 1 reply; 4+ messages in thread
From: Jay Brack @ 1996-04-23 4:00 UTC (permalink / raw)
We are switching multiple applications from DEC Alphas
running OSF/1 V1.3 (and Motif V1.1.3) to Digital UNIX V4.0
(and Motif 1.2.4). We've noticed some differences in the
operation of some widgets. In particular:
1. I-beam cursors in text widgets
In 1.1.3, the cursor appears only when the text widget
has focus, whereas in 1.2.4, the cursor appears in all
text widgets, whether active or not. Though the cursor
can be completely eliminated using the XmNcursorPositionVisible
resource, it is useful for text insertion.
2. Return (Enter) key button activation
In 1.1.3, a pushbutton can be activated by pressing
either the Return key or the spacebar when the button
has focus. In 1.2.4, only the spacebar works. Attempts
to override the Return key translations don't have any
effect (although translation override works with other keys,
such as "a"). An example program is provided below.
3. Focus selection
In a form containing a scrolled window in turn containing
a text widget with a horizontal scrollbar above it, the
XmNdefaultButton resource of the outer form is used to
set the focus to the text widget on startup. In 1.1.3,
it does just this. In 1.2.4, the focus goes to the
scrollbar. An example program for this is shown below.
We have a sizable installed base and would like to provide
continuity between versions. We have beem unable to find
any way duplicate the 1.1.3 functionality under 1.2.4. Any
information concerning these issues would be most welcome.
Example code follows:
-----------------------------------------------------------------
/*
button_demo - Example for translation behavior
The purpose of this example is to illustrate the difference
in button behavior between Motif versions 1.1.3 and 1.2.4 with
respect to keyboard activation. When it has focus, in 1.1.3,
the button can be activated by pressing either the Return
(Enter) key or the spacebar. In 1.2.4, only the spacebar works.
Attempts at overriding the translation for the Return key to add
this action have so far been unsuccessful.
The program is compiled and linked using the following command
line:
cc -o button_demo button_demo.c -lXm -lXt -lX11
*/
#include <Xm/RowColumn.h>
#include <Xm/PushB.h>
/******************************************************************/
/*
Program exit callback function
*/
static void bye()
{
exit(0);
}
/******************************************************************/
/*
This small demo program just makes a pushbutton, which when pressed,
exits the program.
*/
main(argc,argv)
int argc;
char *argv[];
{
XtAppContext app;
Widget toplevel, rowcol,
button;
toplevel = XtVaAppInitialize(&app,
"Button_demo",NULL,0,&argc,argv,
NULL,NULL);
rowcol = XtVaCreateWidget("rowcol",
xmRowColumnWidgetClass,toplevel,
XmNentryAlignment,XmALIGNMENT_CENTER,
NULL);
button = XtVaCreateManagedWidget(
"Done", xmPushButtonWidgetClass,
rowcol,NULL);
XtAddCallback(button,
XmNactivateCallback,bye,NULL);
XtManageChild(rowcol);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
}
-----------------------------------------------------------------
/*
focus_demo - Example for focus behavior
The purpose of this example is to illustrate the difference
in keyboard focus behavior between Motif versions 1.1.3 and
1.2.4. A text widget is placed within a scrolled window with
a horizontal scrollbar above the text widget. The XmNdefaultButton
resource of the container form is used to set the initial keyboard
focus to the text widget. In 1.1.3, it works; in 1.2.4, the focus
goes to the scrollbar.
The program is compiled and linked using the following command
line:
cc -o focus_demo focus_demo.c -lXm -lXt -lX11
*/
#include <Xm/Form.h>
#include <Xm/ScrolledW.h>
#include <Xm/Text.h>
/******************************************************************/
/*
This small demo program just makes a text widget in a scrolled
window.
*/
main(argc,argv)
int argc;
char *argv[];
{
XtAppContext app;
Widget toplevel, scrollw,
bigform, form, text;
toplevel = XtVaAppInitialize(&app,
"Focus_demo",NULL,0,&argc,argv,
NULL,NULL);
bigform = XtVaCreateWidget("bigform",
xmFormWidgetClass,toplevel,
NULL);
scrollw = XtVaCreateWidget("scroll",
xmScrolledWindowWidgetClass,bigform,
XmNscrollBarPlacement,XmTOP_LEFT,
XmNscrollingPolicy,XmAUTOMATIC,
XmNtopAttachment,XmATTACH_FORM,
XmNleftAttachment,XmATTACH_FORM,
XmNrightAttachment,XmATTACH_FORM,
XmNbottomAttachment,XmATTACH_FORM,
NULL);
form = XtVaCreateWidget("form",
xmFormWidgetClass,scrollw,
NULL);
text = XtVaCreateManagedWidget("text",
xmTextWidgetClass,form,
XmNhighlightOnEnter,True,
XmNtopAttachment,XmATTACH_FORM,
XmNleftAttachment,XmATTACH_FORM,
XmNrightAttachment,XmATTACH_FORM,
XmNbottomAttachment,XmATTACH_FORM,
NULL);
XtVaSetValues(bigform,
XmNdefaultButton,text,
NULL);
XtManageChild(form);
XtManageChild(scrollw);
XtManageChild(bigform);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
}
--
------------------------------------------------------------------------------
Jay Brack (brack@nm.picker.com)
The opinions expressed herein are not understood by my employer.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Help: Problems with Motif 1.2.4
1996-04-23 4:00 Help: Problems with Motif 1.2.4 Jay Brack
@ 1996-04-26 4:00 ` Chuck Dillon
1996-04-29 4:00 ` Jason Mann
0 siblings, 1 reply; 4+ messages in thread
From: Chuck Dillon @ 1996-04-26 4:00 UTC (permalink / raw)
To: brack
> We have a sizable installed base and would like to provide
> continuity between versions. We have beem unable to find
> any way duplicate the 1.1.3 functionality under 1.2.4. Any
> information concerning these issues would be most welcome.
Jay,
Sorry, but I don't have any specific answers for you but have
you compared the style guide for 1.2.4 to that of 1.1.3? Is
it not possible that a change in style occurred such that OSF
"refined" the UI in some ways? If so, one would expect that
there would be some differences in operation. What 1.2.4 does
would be where Motif is going what 1.1.3 did is where Motif was.
Wouldn't your users be better off migrating to the current Motif
way of doing things which would be consistent with other Motif
applications they might encounter? Should an installed base
represent so much inertia that we expend resources fighting to
stay where we are rather than to move forward?
Chuck Dillon
ced@noran.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help: Problems with Motif 1.2.4
1996-04-26 4:00 ` Chuck Dillon
@ 1996-04-29 4:00 ` Jason Mann
1996-04-29 4:00 ` Tom Schutter
0 siblings, 1 reply; 4+ messages in thread
From: Jason Mann @ 1996-04-29 4:00 UTC (permalink / raw)
Cc: brack
Chuck Dillon wrote:
>
> Jay Brack wrote:
> > We have a sizable installed base and would like to provide
> > continuity between versions. We have beem unable to find
> > any way duplicate the 1.1.3 functionality under 1.2.4. Any
> > information concerning these issues would be most welcome.
>
> Sorry, but I don't have any specific answers for you but have
> you compared the style guide for 1.2.4 to that of 1.1.3? Is
> it not possible that a change in style occurred such that OSF
> "refined" the UI in some ways? If so, one would expect that
> there would be some differences in operation. What 1.2.4 does
> would be where Motif is going what 1.1.3 did is where Motif was.
> Wouldn't your users be better off migrating to the current Motif
> way of doing things which would be consistent with other Motif
> applications they might encounter? Should an installed base
> represent so much inertia that we expend resources fighting to
> stay where we are rather than to move forward?
Depends on your definition of 'move forward'. Having a stippled I-beam
cursor in a text box at all times is not what I call moving forward.
Looking ugly, yes, but hardly moving anywhere in terms of style.
(Right, I'm going to be controversial here...) Motif may have won the
widget war on UNIX because, arguably, it has a PC windows look'n'feel
(whatever you may actually feel about Windows, it has a large
user-base). And in Windows you can certainly press return on the focused
button to activate it, so if this one was a style decision, then again
it was a questionable decision.
I can't answer all the original questions because I haven't come
across them/haven't bothered to change them, but the first one did annoy
me enough....
The cursor problem can be overcome by setting the
XmNcursorPositionVisible to False and then adding a
XmNfocusCallback/XmNlosingFocusCallback callback which sets the resource
to true/false.
With the focus problem, have you tried setting the XmNinitialFocus
resource on the manager widget?
I haven't checked the FAQ for a while, but these definately seem to be
FAQs.
Regards,
Jason Mann
jasman@nortel.co.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help: Problems with Motif 1.2.4
1996-04-29 4:00 ` Jason Mann
@ 1996-04-29 4:00 ` Tom Schutter
0 siblings, 0 replies; 4+ messages in thread
From: Tom Schutter @ 1996-04-29 4:00 UTC (permalink / raw)
In article <3184BE11.109@nortel.co.uk>, Jason Mann <jasman@nortel.co.uk> writes:
|>
|> The cursor problem can be overcome by setting the
|> XmNcursorPositionVisible to False and then adding a
|> XmNfocusCallback/XmNlosingFocusCallback callback which sets the resource
|> to true/false.
How do you do this with a TextField widget? A TextField widget does not have the
XmNfocusCallback/XmNlosingFocusCallback callbacks.
Thanks,
Tom Schutter
tom@platte.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-04-29 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-04-23 4:00 Help: Problems with Motif 1.2.4 Jay Brack
1996-04-26 4:00 ` Chuck Dillon
1996-04-29 4:00 ` Jason Mann
1996-04-29 4:00 ` Tom Schutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox