Re: need help in communicating messages in a tooltip style

On Wed, Jun 01, 2005 at 04:37:42AM -0700, peter wrote:
> Hi,
>  I am building an application with GTK+ and I want to
> communicate messages to the user in the form of tool
> tips which are independent of buttons ...
>  I don't want my messages to be in a message box but I
> want the message to show in a tool tip  which is
> independent of the place where the action happened (I
> want my messages to appear at the bottom right of the
> screen).
>  How can I do this.

here's an idea:

you should be able to do something like this using a dialog window.

- add a single GtkLabel to the top level container for the message
- decorate the label using markup, the dialog background color, etc
- make the dialog:
  - non-modal
  - not decorated
- size and place the dialog using whatever standard methods are
- destroy the dialog using a timeout callback

seems like a lot of trouble though.  why not display your message in a
GtkMessageDialog instead?  I sometimes destroy non-modal version of this
widget with a timeout callback.  it works well...  and functions quite a
bit like what you describe, but does not look like a tool-tip.

- Ben

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