Tooltip in a WEL Dialog

6 messages Options
Embed this post
Permalink
Hubert Cater

Tooltip in a WEL Dialog

Reply Threaded More More options
Print post
Permalink
I haven't been able to have my tooltips pop up in a Dialog window and I was wondering if there is a trick to get it to work.  In a normal WEL window they appear just fine and from what I've researched it seems as though it is not so straightforward for dialog windows.

I looked at WEL example for common controls that displays tooltips and I noticed the following snippet of code which I did not need for my main window:

on_notify (control_id: INTEGER; info: WEL_NMHDR)
                        -- Draw the tooltips
                local
                        tt: WEL_TOOLTIP_TEXT
                do
                        if info.code = Ttn_needtext then
                                create tt.make_by_nmhdr (info)
                                -- Set resource string id.
                                tt.set_text_id (tt.hdr.id_from)
                        end
                end

I tried incorporating this in my dialog window but to no avail.  Does anyone know hot to have tooltips properly appear in a WEL dialog window?

Thanks in advance,
Hubert

Emmanuel Stapf

RE: Tooltip in a WEL Dialog

Reply Threaded More More options
Print post
Permalink
> I tried incorporating this in my dialog window but to no avail.  Does
> anyone know hot to have tooltips properly appear in a WEL dialog window?

Could you make available a simple project that reproduce the problem? I think it
will be easier to understand what could go wrong.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Hubert Cater

Re: Tooltip in a WEL Dialog

Reply Threaded More More options
Print post
Permalink
Hi Manu,

I think I found the issue as I forgot the dialogs I am using were set to
be NOT visible and since they were painted to the screen with bitmaps I
forgot about this 'style' setting.  Naturally tool tips will not work on
an 'invisible' window even if it appears to be showing to the user.

By the way when I attempted to create basic WEL applications using the
Wizard in EiffelStudio both the FRAME window and the DIALOG window
projects failed when I tried to launch them.  Looks like if you install
with the option to precompile the BASE and WEL libraries these simple
applications will fail unless you FREEZE them first.

As far as I can tell this looks like it is because it does not know of
the resources in the .rc file until they are frozen.

Hubert


Emmanuel Stapf [ES] wrote:

>
>
>
>  > I tried incorporating this in my dialog window but to no avail. Does
>  > anyone know hot to have tooltips properly appear in a WEL dialog window?
>
> Could you make available a simple project that reproduce the problem? I
> think it
> will be easier to understand what could go wrong.
>
> Regards,
> Manu
>

--
Fury Software
http://www.furysoftware.com

Battlefront.com
http://www.battlefront.com
Heiko Gering

Re: Tooltip in a WEL Dialog

Reply Threaded More More options
Print post
Permalink
> By the way when I attempted to create basic WEL applications using the
> Wizard in EiffelStudio both the FRAME window and the DIALOG window
> projects failed when I tried to launch them.  Looks like if you install
> with the option to precompile the BASE and WEL libraries these simple
> applications will fail unless you FREEZE them first.
>
> As far as I can tell this looks like it is because it does not know of
> the resources in the .rc file until they are frozen.
>
That's right. You should also get an exception while your application is
looking for an icon, befefore you freeze it.

Regards Heiko

Hubert Cater

Re: Tooltip in a WEL Dialog

Reply Threaded More More options
Print post
Permalink
Hi Heiko,

Thanks for your response and while I realize that this is technically
correct it might seem strange for a first time user if they install with
the precompiles and allow the wizard to generate these simple
applications that they do not run without raising an exception the first
time out.

There may be no intuitive way around this but perhaps an automatic
freeze in such a case, i.e. if using the Wizard, might produce a more
pleasant result for anyone new to Eiffel etc.

Hubert


Heiko Gering wrote:

>
>
>
>  > By the way when I attempted to create basic WEL applications using the
>  > Wizard in EiffelStudio both the FRAME window and the DIALOG window
>  > projects failed when I tried to launch them. Looks like if you install
>  > with the option to precompile the BASE and WEL libraries these simple
>  > applications will fail unless you FREEZE them first.
>  >
>  > As far as I can tell this looks like it is because it does not know of
>  > the resources in the .rc file until they are frozen.
>  >
> That's right. You should also get an exception while your application is
> looking for an icon, befefore you freeze it.
>
> Regards Heiko
>
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.339 / Virus Database: 270.12.66/2172 - Release Date: 06/12/09 17:56:00
>

--
Fury Software
http://www.furysoftware.com

Battlefront.com
http://www.battlefront.com
Emmanuel Stapf

RE: Tooltip in a WEL Dialog

Reply Threaded More More options
Print post
Permalink
> Thanks for your response and while I realize that this is technically
> correct it might seem strange for a first time user if they install with
> the precompiles and allow the wizard to generate these simple
> applications that they do not run without raising an exception the first
> time out.
>
> There may be no intuitive way around this but perhaps an automatic
> freeze in such a case, i.e. if using the Wizard, might produce a more
> pleasant result for anyone new to Eiffel etc.

Thanks for bringing this up. For the 6.4 release, the WEL wizard will
automatically freeze the code to include the external resources.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------