# Need guidelines for developing GUI builder tool using ruby-gtk2

**URL:** <https://www.ruby-forum.com/t/need-guidelines-for-developing-gui-builder-tool-using-ruby-gtk2/222835>\
**Category:** Ruby-Gnome 2\
**Created:** [September 12, 2012, 1:42pm UTC](https://www.ruby-forum.com/t/need-guidelines-for-developing-gui-builder-tool-using-ruby-gtk2/222835 "2012-09-12T13:42:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 12, 2012, 1:42pm UTC](https://www.ruby-forum.com/t/need-guidelines-for-developing-gui-builder-tool-using-ruby-gtk2/222835/1 "2012-09-12T13:42:20Z")

</div>

Hello,

I am in process of developing custom GUI generator tool (its new GUI  
tool  
like glade) and to achieve that i am using ruby-gtk2. I am a newbie to  
the  
world of ruby and gtk, so i need a help in a problem which i am struck  
regarding adding background image to a widget.

Let me explain in detail, the application (i.e.,GTK::window) has two  
sections say left section and right section (section can be  
frames,layouts,panned window or equivalent). Left section has a list of  
all  
widgets like Button, Label, CheckBox and so on as images. So user who  
needs  
to design the GUI will drag and drop any widgets from left section to  
right sections, on dropping to right section it (i.e., widget) should be  
re-sizable and also draggable across right section.

Currently i am adding all widgets to eventbox so that on drag n drop on  
right section i will get all the controls of events like drag\_start,  
drag\_motion, drag\_end etc…But how can i add an image as background to  
eventbox, so that i have button image added to eventbox and also handle  
resize and drag. Concept is user should be able to resize the properties  
of  
widget that drops to right section. Need help in implementing this, i  
know  
i am missing something to achieve this. Awaiting any suggestions.

---

<div class="post-metadata">

**Author:** ![Madhav\_NV](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Madhav\_NV](https://www.ruby-forum.com/u/Madhav_NV)\
**Post date:** [December 4, 2012, 5:24am UTC](https://www.ruby-forum.com/t/need-guidelines-for-developing-gui-builder-tool-using-ruby-gtk2/222835/2 "2012-12-04T05:24:01Z")

</div>

Hi:

What is the status of your project. I’d love to see it happen. I was  
thinking that it would be really nice to have a GUI builder that runs  
directly from your program at runtime. For example, if your program  
displayed a form with a button on it, you could press a hotkey to go  
into “edit mode” and drag the edges of the button to make it bigger.  
Each widget would have saved key-value pairs:

width = 55  
label = “Button title”

Then when you make a final version of the program, the key-values would  
be used just like a .glade file.

I hope you pursue your idea.

Best,

Eric C
