From: Sander Jansen Date: 2003-02-25T11:45:14+09:00 Subject: Re: FXRuby FXText width? Hi, First of all, the second parameter in the constructor of FXTextField tells FOX how many characters in the textfield should at least be visible.. so 1 is kind of small. Second, if you want to specify the width or height by pixels, you need to pass LAYOUT_FIX_WIDTH or LAYOUT_FIX_HEIGHT to the options parameter. (then the 500 for example will be actually be used for example). Ofcourse most of the time its better to say LAYOUT_FILL_X, so that it will take as much space there is available. Hope this helps, Sander On Monday 24 February 2003 08:18 pm, Chris Morris wrote: > I have the following (1.0.20) code. All FXTextFields are set to a default > width, regardless of what I pass the constructor or set afterwards. What am > I doing wrong? > > class DBLogin < FXMainWindow > include Responder > > attr_accessor :dblogin > > def initialize(app) > @app = app > super(@app, "Login", nil, nil, DECOR_ALL, 0, 0, 400) > > FXLabel.new(self, 'Server') > @server = FXTextField.new(self, 1, nil, 0, TEXTFIELD_NORMAL, 0, 0, > 500) > FXLabel.new(self, 'Database') > @database = FXTextField.new(self, 1) > FXLabel.new(self, 'User') > @username = FXTextField.new(self, 1) > FXLabel.new(self, 'Password') > @password = FXTextField.new(self, 1) > ... -- Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read.