Hi Farid,
You could embed an IFrame into the tooltip that points to your static
HTML file on the server. The only draw back to this is that you will
have to set the size of the IFrame manually and if it's too small you'll
see scrollbars inside the tooltip.
HTH
Matt
Farid Elyahyaoui wrote:
> HI,
>
> thanks for the quick response.
> Using a mixin is probably a good way which I didn't think of yet (I'm
> a C-programme mainly).
> The question remains:
> how do I convert html files that are available on the server to html
> that can be used in
> a tooltip using a server request?
> I already have php classes for handling rpc events but if possible I
> want to prevent to create new
> communication classes for each help.
> Using your example I am thinking something like this:
>
> myLoginButton.setHelpPage('manual/gettingstarted.html')
>
> where the contents of this html page (which is a normatl html file
> that can be accessed with a normal browser on
> http://mysite.com/manual/gettingstarted.html) would be loaded using a
> request when the widget is hovered.
> thanks in advance
>
> Farid
>
> On Tue, Jan 6, 2009 at 11:25 AM, Ralf Nieuwenhuijsen
> <[email protected]> wrote:
>> You can display HTML in a tooltip!
>>
>> var myTT = new qx.ui.tooltip.ToolTip('the html code');
>> myTT.setRich( true );
>>
>> That last line says it shouldn't escape the label, and just display
>> all the html tags it contains as is.
>>
>> As for the discussion .. ..
>>
>> To have the tooltips set automatically you should create a mixin and
>> patch the core qx.ui.core.Widget class. This mixin would add a 'help'
>> or 'helpCategory' propery. That property would have an apply method
>> that automatically setups the tooltip. This way all you need to do is
>> setup the that property whever you want. So say you have a login
>> button, you would just myLoginButton.setHelpCategory('login'); and
>> that's all.
>>
>> That would be a very clean solution. The help html-fragments itself
>> can either be requested delayed for each tooltip (but it might create
>> too many requests) or just once in total at the beginning. Perhaps in
>> a singleton class, that just 'manages' all the html-fragments in a big
>> map. If you do this asynchronizely, you may want to put some magic in
>> there so when it's done loading, it will setup the tooltips of the
>> widgets already on screen. This way you don't introduce any pauzes.
>> The tooltips are just setup a second after the user is already using
>> the app.
>>
>> Greetings,
>> Ralf N.
>>
>> 2009/1/6 Farid Elyahyaoui <[email protected]>:
>>> Hi,
>>>
>>> Maybe this isn't the right place to ask but I will try it anyway under
>>> the umbrella of "freedom of speech" ;-)
>>> And it might be usefull to other qooxdoo developers.
>>> Here it is: I want to add contextual help to my application.
>>> I was thinking about big tooltips in HTML (containing text and images)
>>> )that pop up when you hover over some widget.
>>> I don't want to hard code the html in javascript in my application as
>>> this would make my application too large
>>> and I already have the html files available for a manual. I would like
>>> to re-use this html for maintenance reasons.
>>>
>>> should I use rpc to get the html? How would I convert this html to
>>> display it in a widget?
>>> Any suggestions anybody?
>>> How would you add contextual help to your application?
>>> All ideas and alternatives are welcome.
>>>
>>> Farid
>>> PS: it's a joy to work with qooxdoo. Love it. I am even thinking about
>>> creating a website using the qooxdoo library to do fancy
>>> stuff like fading and window movements.
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>
> ------------------------------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel