Hi all, I need to change at runtime the bitmap label of a Static Bitmap control. I use this code: def change_img_at_click img = File.join(File.dirname(__FILE__), "/immagini/03_muro_RETT.png") @m_bitmap1.set_bitmap(Wx::Bitmap.new(img)) end But avery click the new image translate upward.... why? -- Posted via http://www.ruby-forum.com/.
up -- Posted via http://www.ruby-forum.com/.
On 03/01/2011 11:07, Alessandro Barracco wrote:> I need to change at runtime the bitmap label of a Static Bitmap > control. > I use this code: > > def change_img_at_click > img = File.join(File.dirname(__FILE__), "/immagini/03_muro_RETT.png") > @m_bitmap1.set_bitmap(Wx::Bitmap.new(img)) > end > > But avery click the new image translate upward.... why?Looks OK. Are the images the same size? I don''t remember needing to do this, but you might try calling sizer.layout on the containing sizer a
On 04/01/2011 08:15, Alessandro Barracco wrote:> up >PS - please don''t do this. You might think you''re looking at a forum, but this is primarily a mailing list which a third party mirrors onto a forum. This kind of message is annoying to the m.l. users. Happy to help in the future, but you may find you get a quicker response if you provide more detail about what you''re trying to do, what you expected to happen that didn''t, and a complete, simplified runnable sample. cheers alex