[Gtk-sharp-list] Couple of easy ones

Aaron Oxford aaron at hardwarehookups.com.au
Mon Apr 9 01:23:27 EDT 2007


Hi all,

I've got a few simple questions I haven't been able to suss out 
myself using the docs/examples/Nabble. First, can I bound a Pango 
operation in the Y direction? Having text bleeding downwards an 
unknown distance is not handy. :-) The docs talk about being able to 
do much more with Pango (ie finer control) but I can't get my head 
around how. I did try to draw the lines[] of a Layout separately but 
with no success.

Also, is there an equivalent to or way of doing 
Graphics.MeasureString() in Pango? One of my major components kinda 
hinges on knowing the size of a character when is being drawn. It's 
basically a grid of characters - more on that in a future post...

The second question is about HPaned and VPaned. Is there a simple 
accepted way to set the proportion (or at the very least the 
width/height of the left/top panel) and to have the application 
remember the setting? Basically I can see what I might have to do 
here, but I was guessing there would be a common (well tested) way to do it.

Thirdly, I'm presently having to do context menus myself and they 
look dumb. Can I display a floating MenuBar widget somehow? Better 
yet is there a context menu widget I don't know about? I can see 
events for context menus and have read several posts requesting info 
about it but I can't find any actual info.

Sorry, a lot of the questions I have probably seem extra dumb because 
I'm doing all this without Glade and my GUI has two fairly complex 
custom controls that are taking up most of my time - always fun when 
you're new to the API to begin with. :-) I'm managing to overcome 
most problems but these have had me stumped from the start. Thanks in 
advance for any info,

Aaron.
---------------------------------------------------------------------------------
Aaron Oxford   -   aaron+hardwarehookups .com .au
Director, Innovative Computer Solutions (Aust) Pty. Ltd.
49 Maitland Rd, Mayfield, NSW 2304 Australia
http://www.ic-solutions.com.au
Developer, SourceForge project VioLet Composer
http://sourceforge.net/projects/buzz-like



More information about the Gtk-sharp-list mailing list