Date: Mon, 07 Mar 2005 15:06:46 +0100 (CET) Message-Id: <20050307.150646.74741015.oandrieu at nerim.net> To: rich at annexia.org Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: Set properties on widgets - how? From: Olivier Andrieu In-Reply-To: <20050306232632.GA27784 at furbychan.cocan.org> References: <20050306225923.GA24625 at furbychan.cocan.org> <20050306232632.GA27784@furbychan.cocan.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Richard Jones [Sun, 6 Mar 2005]: > OK, so I did find the "set_property" function, so now I have this: I'll add it to GEdit#entry . > > let headline_entry = > let entry = GEdit.entry ~text:data.headline ~width_chars:45 > ~packing:(table#attach ~top:0 ~left:1 ~expand:`NONE ~fill:`NONE) () in > entry#misc#set_name "headline"; > entry#misc#set_property "xalign" (`FLOAT 0.); > entry in > > However this doesn't appear to do anything. Well, first, 0. is the default value for the xalign property, so this probably won't change anything. > What I want is for the entry box to be left aligned inside its table > cell, and _not_ for it to fill (the width must remain at 45 chars). > Something like this: > > +----------------------------------------------- table cell ------+ > |+---------------------- entry box ---+ | > || | | > || | | > || | | > |+------------------------------------+ | > +-----------------------------------------------------------------+ > > Is it possible to do this? You could try wrapping your entry in a GBin.alignment widget : that way you'll be able to request a width for the alignment. -- Olivier