[Gtk-sharp-list] Gtk.TextView, space separated values

Pedro Guridi pipiten at gmail.com
Tue Apr 22 12:49:24 EDT 2008


George,

Thanks for your answer!.
About the data structure, are coordinates/altitudes for different
points (one by line).
The reason why I can't use a ListStore, it's because I need the user
to select the column containing each value.
It's the way that they user will tell to the program "coordinate X
it's from column 23 to column 32..", so the program knowns what to
read, and import to the database. That's why it's so important the
column position.
I'm sure that the issue it's the variable-width font in TextView, but
I couldn't figure out how to change that behaviour, still.

Thanks again.., if anybody knows how to change the font used in
TextView,I'll  appreciate..

Regards,

Pedro Guridi



On Tue, Apr 22, 2008 at 12:15 PM, Gergely Kiss <mail.gery at gmail.com> wrote:
> Hi,
>
> I don't know what this data structure is, but it looks like a table. Why
> don't you put it into a ListStore object and then display in a TreeView?
> There's a great tutorial on how to use TreeViews, just follow this link.
>
> My idea is, that both console windows and gedit use the monospace font,
> which is always fixed-width. I don't know anything about the TextView widget
> (haven't used so far), but it seems, that it uses a variable-width font
> (probably Sans), that's why the text you'd like to display slightly
> differently as in gedit.
>
> I hope, I could help some.
>
> George
>
> 2008/4/20 Pedro Guridi <pipiten at gmail.com>:
> >
> >
> >
> > (sorry the spam.. I forgot the proper subject.., my apologies..)
> >
> >
> > Hi all,
> >
> >  I have a file with space separated values, which I load it into a
> TextView.
> >  This it's an example how it looks like when I open it in gedit, or if
> >  I just print it line by line to the terminal with Console.write() :
> >
> >  ...
> >  1277   5412L2              1       5        0        0     00:07       1
> LIS
> >  1277   5413L2              1       5        0        0     00:07       1
> LIS
> >  1277   5414L2              1       5        0        0     00:07       1
> LIS
> >  1127   5355L2              1       5   1000       25    02:00       5
> Pampa
> >  1127   5353L2              1       5   1000       25    01:40       5
> Pampa
> >  ..
> >
> >  But when I load it into the textview, some columns position changes, like
> this:
> >
> >  1277   5412L2              1       5      0        0     00:07       1
> LIS
> >  1277   5413L2              1       5      0        0     00:07       1
> LIS
> >  1277   5414L2              1       5      0        0     00:07       1
> LIS
> >  1127   5355L2              1       5   1000       25     02:00       5
> Pampa
> >  1127   5353L2              1       5   1000       25     01:40       5
> Pampa
> >
> >  I need to find a way to be able to show the text in the correct format
> >  ( maybe a fixed font, or a Gtk.TextTag? just guessing.. )
> >
> >  I would appreciate any help, thanks in advance,
> >
> >  Mono version: 1.9
> >  Gtk-Sharp version: 2.10.0
> >  Ubuntu Gutsy x32.
> >
> >
> >  Pedro Guridi
> > _______________________________________________
> > Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
>
>


More information about the Gtk-sharp-list mailing list