Hi there, i am trying to expand a flex grid sizer horizontally. I have a 2x2 sizer, in the left column are two StaticTexts and in the right column two TextCtrls. I''d like to expand this grid sizer so that the TextCtrls reach the right border. This is my code: settingsLayout = BoxSizer.new(VERTICAL) settingsRow = FlexGridSizer.new(2,2,10) settingsRow.add(consumerSecretLabel, 0, ALL, 0) settingsRow.add(@consumerSecretInput, 1, EXPAND|ALL, 0) settingsRow.add(consumerKeyLabel, 0, ALL, 0) settingsRow.add(@consumerKeyInput, 1, EXPAND|ALL, 0) settingsLayout.add(settingsRow, 1, EXPAND|ALL, 3) self.set_sizer(settingsLayout) Right now it is so that the TextCtrls have the same width as the StaticTexts. Can you tell me how to expand them horizontally? Thank you. --- Before printing this email, think if it is really needed. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
On 05/07/2011 20:11, Simon Szustkowski wrote:> i am trying to expand a flex grid sizer horizontally. I have a 2x2 sizer, in the left column are two StaticTexts and in the right column two TextCtrls. I''d like to expand this grid sizer so that the TextCtrls reach the right border. This is my code: > > settingsLayout = BoxSizer.new(VERTICAL) > settingsRow = FlexGridSizer.new(2,2,10) > settingsRow.add(consumerSecretLabel, 0, ALL, 0) > settingsRow.add(@consumerSecretInput, 1, EXPAND|ALL, 0) > settingsRow.add(consumerKeyLabel, 0, ALL, 0) > settingsRow.add(@consumerKeyInput, 1, EXPAND|ALL, 0) > settingsLayout.add(settingsRow, 1, EXPAND|ALL, 3) > self.set_sizer(settingsLayout) > > Right now it is so that the TextCtrls have the same width as the StaticTexts. Can you tell me how to expand them horizontally?Not tested, but I think you ought to specify that the second column of the FGSizer should take up extra space settingsRow.add_growable_column(1) alex
Simon Szustkowski
2011-Jul-08 19:22 UTC
[wxruby-users] Expanding a flex grid sizer horizontally
Fine, that helps. Thank you --- Before printing this email, think if it is really needed. On 06.07.2011, at 15:35, Alex Fenton wrote:>> > > Not tested, but I think you ought to specify that the second column of the FGSizer should take up extra space > > settingsRow.add_growable_column(1)-------------- n?chster Teil -------------- Ein Dateianhang mit Bin?rdaten wurde abgetrennt... Dateiname : smime.p7s Dateityp : application/pkcs7-signature Dateigr??e : 4221 bytes Beschreibung: nicht verf?gbar URL : <http://rubyforge.org/pipermail/wxruby-users/attachments/20110708/3c3adf55/attachment-0002.bin> -------------- n?chster Teil -------------- Ein Dateianhang mit Bin?rdaten wurde abgetrennt... Dateiname : PGP.sig Dateityp : application/pgp-signature Dateigr??e : 243 bytes Beschreibung: This is a digitally signed message part URL : <http://rubyforge.org/pipermail/wxruby-users/attachments/20110708/3c3adf55/attachment-0003.bin>