Motif Text Field Data Entry

I am enhancing a C application running on RedHat Linux that uses Motif for the user interface.  I would like the text data entry boxes to behave like they do in windows.  Namely, click to move the focus to them, but allow data entry regardless of where the cursor happens to be.

Currently the application will only let you enter data in a field if you click in the field and the mouse cursor remains hovering over the field.  This makes data entry very annoying as after clicking the cursor tends to stray away from the field.

I've looked into setting keyboardFocusPolicy but that only seems to set whether or not you need to click in a field to set the focus.  I want some property that says "Continue to allow data entry in field with focus even if cursor is out of field".  Is there such a property or setting like this in Motif?

Who is Participating?
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Wow... Motif... Talk about a blast from the past.

As I recall, last I worked with Motif was around 1992, there's both Keyboard Focus + Pointer Input Focus.

Seems like setting Pointer Input Focus to explicit locks focus to last input ready widget.

And setting Pointer Input Focus to implicit allows setting focus by moving pointer + clicking, then if you use the tab or arrows keys, input focus leaves pointer + proceeds/changes to where ever you move using tab + back tab + right/left/up/down arrows.

Hopefully you have a set of Motif docs that go with your version. Search the index for various types of focus.

Likely using the above setting will achieve your goal.
koughdurAuthor Commented:
Thanks for your quick response.  I haven't had a chance to implement your suggestion, but I was able to get more information by using some of the keywords in your response.  I believe I have a much better understanding of how Motif decides what gets focus and where data entry goes depending on the settings.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Good luck. As I said, early 1990s was last time I used Motif.

My recollections are lost in the mists of time.

Do update this question with how you fix your problem, in case someone else searches for the same solution.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.