[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CDK selection widget and aligning text
From: |
TheLonelyStar |
Subject: |
CDK selection widget and aligning text |
Date: |
Sat, 21 Mar 2009 04:41:18 -0700 (PDT) |
I use the cdk selection widget to display a list information.
I want to organize the information in columns (first name, last name e.t.c).
How to do that? I wrote a function which makes a string to a fixed size by
adding spaces or removing characters from the end.
string fix_size(string s,int size);
That way, I can build my table like this:
row[i]=fix_size(first_name[i],30)+"|"+fix_size(last_name[i],30)+"|"+...
The trouble is, I use UTF-8 characters (umlaute in example). And how to not
know how to count the displayed string length ...
How would you do this?
Thanks
Nathan
--
View this message in context:
http://www.nabble.com/CDK-selection-widget-and-aligning-text-tp22635127p22635127.html
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.
- CDK selection widget and aligning text,
TheLonelyStar <=