Change in focuas and Blinking text

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

6 posts / 0 new
Last post
Change in focuas and Blinking text

Submitted by Anonymous on Tue, 12/11/2001 - 10:48. Developers
Hello all,

I am using a text widget on a Drawing Area widget.I have set focus on a text widget so that user can give choices.But when i chage to previous scree(window) focus remains set on the text widget though i remove that text widget using XtUnmapWidget/XtUnmanageChild.
I have set focus on the text widget XtSetKeyboardFocus()
Now want to change the focus to parent window.

Also i have search a lot for blinking text...I want a string that blink on the drawing Area widget.

Kindly help me in this cotext ASAP
I`ll wait for dbl reply,always take part in every query and solve problem.

Thanks in advance.

Anonymous

I have tried XtUnmanageChild and now its working fine.
If anybody can help me in Blinking text ..i want a blinking line on DrawingArea widget ..like when user enter wrong data then this text string will blink ..kind of alert.

Thanks in advance
Regards
Smita

ICS_support

Blinking isn`t really a good interface; many users find it too difficult to use. An alert (message box) is considered better. You could use blinking as a supplemental.

The easy way well, you can just do Xlib text drawing into the XmDrawingArea, but then you duplicate the work of the XmText.

The brute-force but effective way reset the text to "", then reset it to the value that you are interested in displaying, using timers to effect the change (see http//www.motifzone.com/resources/man/XtAppAddTimeout.html for details).

ICS_support

You won`t often have a need to call either XtUnmapWidget or XtSetKeyboardFocus; these are routines that are used by Xt or by the Motif widgets themselves. It`s not usually appropriate for applications to be using them. You could use XmProcessTraversal to do focus management.

Anonymous

Thanks dbl,

Now i am using XmProcessTraversal to change the focus to text box ,and XtUnmanageChild to clear the textbox to switch to previous screen.Its working fine if i enter my first choice to switch to previous screen,but if i enter some input and after that if want to switch to previous screen then it switch to previous screen but textbox remains oon the windoa and focus also not change to the screen..focus is in the textbox only
I have tried XmProcessTraversal with options XmTRAVERSE_HOMe,XmTRAVERSE_UP etc but its not working
What i want is when i give option to switch to previous screen then focus change to the screen only and textbox disapear.
While executing this prog. what i found that after entering input to textbox and then when want to go to previous screen by giving input to switch, the callback of previous screen that is XmNexposeCallback .using XmDrawingAreaCallbackStruct not get the control to gain the focus .

I hope understand both the problems.
Thanks in advance

Regards
smita

ICS_support

I`m not sure whether your previous screen is a separate window or not.

I believe that what you want can be obtained by unmanaging the widget or popping down the dialog containing it, and then using XmProcessTraversal, naming the specific widget you want to have focus and the tag CURRENT (I think XmTRAVERSE_CURRENT, specifically).

XmProcessTraversal is pretty good about getting focus to a particular widget, and I`d depend on it to do the work, rather than relying on some combination of exposure callbacks.