Xaw3d asciiTextWidget: how to scroll right without scrollbar


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Xaw3d asciiTextWidget: how to scroll right without scrollbar
# 1  
Old 08-09-2011
MySQL Xaw3d asciiTextWidget: how to scroll right without scrollbar

this is kinda solved
Hi


I need to program an ordinary text field which scrolls to the right when it gets filled. It must be in Xaw3d. I cannot get the asciiTextWidget to do it.

Which resource do you need to set in asciiTextWidget to allow the widget to scroll to the right when typing text in it (without showing the scrollbar: like in the address bar in firefox, or in any other text field in the world)?

In asciiTextWidget, when i fill a (one-line) text widget, the last typed characters become invisible. This is what also happens in eg. the xfig application,and is not what I want.
However,in the xfm file manager popups (like 'install' from the application window), the text scrolls to the right, hiding the letters on the left side. I cannot find anything in the app-defaults which causes this behavior. When I compile xfm myself, it does not allow this scrolling, but xfm from my (Linux abd BSD) distributions does, so I think it must be in the resources somewhere.

Looking it up, in xfm source code, the function call is in createPopupQuestions(). When I try this same function with the text_args from the same source, I still do not get the behavior I need
Code:
static Arg text_args[] = {
  { XtNfromHoriz, (XtArgVal) NULL },
  { XtNfromVert, (XtArgVal) NULL },
  { XtNstring, (XtArgVal) "Text which needs to be scrolled"},
  { XtNlength, (XtArgVal)15   },
  { XtNwidth, (XtArgVal) 200  },
  { XtNtop, XtChainTop },
  { XtNbottom, XtChainTop },
  { XtNleft, XtChainLeft },
  { XtNright, XtChainRight },
  { XtNeditType, XawtextEdit },
  { XtNtype, XawAsciiString },
};



 vert=XtCreateManagedWidget("text", \
       asciiTextWidgetClass, form_widget,text_args , XtNumber(text_args ));

Thanx for any tips

Last edited by Bibi Monash; 08-15-2011 at 07:49 PM.. Reason: solved
# 2  
Old 08-11-2011
On usenet I have found out that I must have been looking at the wrong xfm version. The newer version has its own text field code. I have added that widget to my code now. I would still prefer the default Xaw3d stuff, though
update:
With autofill to true, and overriding "~Ctrl ~Alt <Key>:", you can get comparable behavior in Xaw3d. I set MAXLEN higher than the max possible string length allowed to be inputted, and I use
XawTextSinkFindDistance(XawTextGetSink(widget),position,-1,(XawTextPosition)MAXLEN,\
&someint,&curposition,&someotherint) and XawTextTopPosition(widget) to track the position and line number in the display.
It is not good, but it is a start

Last edited by Bibi Monash; 08-15-2011 at 07:48 PM.. Reason: kind of solved
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. What is on Your Mind?

Man Pages - Removed Table Tags and Fixed Scrollbar Issue

OK. I fixed the horizonal scroll bar issues in the man pages pre format output for the man pages by removing all table tags and converting to divs: https://www.unix.com/members/1-albums220-picture876.png I still have some work to do on reformatting the deep search redirects and the... (0 Replies)
Discussion started by: Neo
0 Replies

2. AIX

Enable scrollbar on all aixterm windows ?

There is this workstations that I sometimes work on and it annoys me because it does not have any vertical scrollbar enabled. I did a Google on activating scroll bar but they talk about escape sequences that I have no clue on how to do this: CSI ? P m h DEC Private Mode Set... (2 Replies)
Discussion started by: Browser_ice
2 Replies

3. Shell Programming and Scripting

Scrollbar in email

Hi, I am sending a text file through email as email-body. This file is having records which have width more than a page. When i recieve the email, i can see no scrollbar in the email. So its not easy to read the mail as multiple pages are shrinked into one page. I want to have horizontal... (1 Reply)
Discussion started by: srilaxmi
1 Replies

4. UNIX for Dummies Questions & Answers

Problem with xterm scrollbar

I have a xterm window opening from my Java code. This xterm is opened from the code in this manner: // to run shell command in a xterm window public synchronized void rshd(String title, String commd) { String xt = "xterm -sb -T "; String xtm = xt + title + " -e " + commd; Runtime run =... (1 Reply)
Discussion started by: vanz
1 Replies

5. UNIX for Advanced & Expert Users

xterm scrollbar issue

I have a xterm window opening from my Java code. This xterm is opened from the code in this manner: // to run shell command in a xterm window public synchronized void rshd(String title, String commd) { String xt = "xterm -sb -T "; String xtm = xt + title + " -e " + commd; Runtime run =... (0 Replies)
Discussion started by: vanz
0 Replies

6. AIX

aixterm scroll?

on a AIX sys i have been trying to get the mouse scroll wheel to page the terminal for about 2 yrs now on aixterm. any ideas. the below syntax does not work in aixterm but does work in xterm. ------------------------- this does not work in aixterm but does work in xterm,, with a cat Xdefult |... (2 Replies)
Discussion started by: nullwhat
2 Replies

7. Solaris

right scrollbar on xterm

I'm using exceed on a Windows PC to open a xterm to my SunOs 5.8 system. Everything works fine except for one thing, I can't have my scrollbar on the right side of the xterm windows. Here's a copy of my .Xdefaults file: # xterm xterm*loginShell: True xterm*background: black... (3 Replies)
Discussion started by: ce9888
3 Replies

8. UNIX for Dummies Questions & Answers

missing scrollbar

Hi, My tcsh window doesn't have a scrollbar, so I don't get a lot of history! Can you help to get scrollbar? Thanks (3 Replies)
Discussion started by: parisa_3456
3 Replies
Login or Register to Ask a Question