Forum: Ruby-Gnome 2 Need guidelines for developing GUI builder tool using ruby-gtk2

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
6be7c61f1188ade3c138589cfbf64337?d=identicon&s=25 Madhav NV (Guest)
on 2012-09-12 13:42
(Received via mailing list)

I am in process of developing custom GUI generator tool (its new GUI
like glade) and to achieve that i am using ruby-gtk2. I am a newbie to
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
widgets like Button, Label, CheckBox and so on as images. So user who
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
widget that drops to right section. Need help in implementing this, i
i am missing something to achieve this. Awaiting any suggestions.
0d130f179f85401f248e6ebc2ef8292f?d=identicon&s=25 Eric C. (eric_c)
on 2012-12-04 05:24

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.


Eric C
This topic is locked and can not be replied to.