I am attempting to populate a GtkListStore with text that has Pango attributes and markup.
I would like display proportional font tabular data with headings, titles, summary lines, and notes, that has labels, numeric values pre-formatted in character form, with left and right justifying. The line layout varies from line to line, and the display will use proportional fonts in some places. An example is, a balance sheet with labels down the left being left justified, columns of numbers right justified, notes following and interspersed with table of data, totals, heading, using proportional fonts. The layout can be quite flexible, with the layout varying from line to line, for example the may be subtotals, and notes embedded within tabular data that has a different tabular layout. There may be several different tabular layouts with the one display driven by the data. Essentially, I simply want to take a piece of text, and put it in a certain (calculated) pixel position. Take the next piece of text and put it in a certain pixel position further along the same line, and in this way build up tabular data, where the rules for layout vary from line to line. I am modifying an existing application that is using GtkListStore. This works fine for fixed width fonts. The application allows for clicking on a line, and returning the key value assigned to that line. The current cursor is displayed by changing the background of an entire line, and the cursor may move up and down lines. Ideally I would line to use Pango formatting and store multiple position information relating to the multiple pieces of text making up a line, encoded into each line of text in the GtkListStore? Or store the data for a line such that when the GtkListStore is rendered, it knows to display a particular piece of data starting at a certain pixel position. Someone suggested using TextView, which I am looking at. It is not clear to me yet how to go about using it. Any help will be much appreciated. Does anyone have any examples or have any suggestions of how to do what I want to accomplish? Thanks, Don. On Tue, 2006-11-28 at 17:28 +1100, Donald Malcolm wrote: > I am populating a GtkListStore with text that has Pango attributes and > markup. I would like to position the text at given distances from the > left side, arranging it into columns. Is there a way to position the > text as a Pango Attribute? Can the position information be encoded into > each line of text in the GtkListStore? > > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list