The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with Fixed width File Parsing sate911 UNIX Desktop for Dummies Questions & Answers 4 05-19-2008 08:18 AM
Changing particular field in fixed width file dsravan Shell Programming and Scripting 4 02-11-2008 03:08 PM
Converting field into fixed width csv videsh77 UNIX for Advanced & Expert Users 1 11-02-2007 02:30 PM
adding delimiter to a fixed width file sumeet Shell Programming and Scripting 2 03-21-2007 07:19 AM
Fixed Width file using AWK alok.benjwal UNIX for Dummies Questions & Answers 2 12-05-2005 08:39 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-20-2002
Registered User
 

Join Date: Oct 2002
Posts: 4
Cool fixed-width printf() output on an XmList on Solaris

This one is a bit of bugger and I'm not sure if it's entirely relevant to this board but here goes...

I'm trying to produce some fixed width output to a List widget (X11/Motif GUI) So, I use something similar to:

sprintf(Buffer, "%*d%*f", 20, some_integer, 20, some_float);

This gives me a nice fixed-width string, which I then have to convert to an XmString and then add that to the List widget.

My problem is, after adding multiple lines, the columns are not aligned. On some machines they are (for instance if I remote shell from a Windows box using ReflectX), but on the host the output does not align.

Most of my widgets use the system default font, through which in Motif (as I understand it) you specify by using XmFONTLIST_DEFAULT_TAG in most of your XmString updates. I have a feeling that the font the host uses is not fixed-width - but I wouldn't have a clue where to change the font or what font it is using. Is it quite possible for X to use non fixed-width fonts?

Perhaps this is better targeted to a Motif forum, but thought it was worth a shot....

Thx in advance
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0