Re: BOOKING...



I accept any advice ( better if implementable whit glade ) .

My suggestions:
Create a table with the shape of the hotel map,
with buttons, one for each room, with a label
showing the room number (use GtkTable and use
empty cells, if you want a non-rectangular shape,
to show the hotel map). If you don't like the look
of many buttons together, you can flatten them with:
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);

Then when you click on a button, a
second window will open showing everything you want about
the room, including the name of the client, type of payment,
data about the room, price, wathever... some of
this information is editable, some is not... etc...
you get lots of flexibility and it's not difficult
to code. Buttons for available rooms might look
green, buttons for rented rooms might look red, 
etc... you can play with foreground/background colors...

you can connect each button to a different callback,
or you can use a single callback for all, passing
the button (room) information in the callback data parameter.
This callback would launch the window containg the entries.
You need to handle "delete_event" for both windows etc...

You will do much better if you write your own
code instead of relying on Glade. Good as it
is, it will never be as good as YOU are, solving YOUR
specific problem.

Carlos



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]