Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Display advanced tooltip to CExtEdit derived class Collapse All
Subject Author Date
Offer Har Sep 18, 2010 - 8:28 AM

Dear Support,


We have  a class derived from CExtEdit and we would like to display a detailed information on it in a tooltip, which contains icon and formatted text. Is this possible? if so how?


Thanks,


Ron.

Technical Support Sep 18, 2010 - 2:49 PM

If you see HTML source code instead of HTML based rich content, then you are using Prof-UIS version that is older than 2.90. You need Prof-UIS 2.90 or later to see the HTML output.

Offer Har Sep 20, 2010 - 3:06 AM

Dear Support,

Any new on that subject?

Thanks,

Ron.

Technical Support Sep 20, 2010 - 10:24 AM

We used the ProfUIS_Controls sample to test the tooltip problem. The first dialog page in it demonstrates button common controls and allows you to type a button tooltip in a single line editor control. We typed HTML text here to see the HTML in the tooltip over the button. Then we modified this sample project. Please find the following code in the PageButtons.cpp file:

   m_btnPushButton.SetTooltipText( LPCTSTR(sTooltip) );

There are two such lines of code. Please replace each of them with the following:
   m_btnPushButton.SetTooltipText( LPCTSTR(sTooltip) );
            m_Tooltip.SetTooltipText( LPCTSTR(sTooltip) );

Now the single line tooltip editor displays the same tooltip text as you type in it. We saw HTML tooltips over this CExtEdit editor.

Offer Har Sep 20, 2010 - 2:31 PM

Dear Support,


I don’t understand - how do I get the tooltip for CExtEdit? what lines make it work? Is there an example of a CExtEdit with tooltip?


Thanks,



Ron.


Technical Support Sep 21, 2010 - 11:26 AM

We prepared a test project that illustrates it:

http:/www.prof-uis.com/download/forums/TestHtmlTooltipOverEdit.zip

Offer Har Sep 21, 2010 - 12:09 PM

Dear Support,

When I compile and run it I still get the whole HTML sting and not the formatted HTML!

Maybe it does not work in 2.90 only in 2.91?

Regards,

Ron.

Technical Support Sep 22, 2010 - 12:05 PM

Yes, you are right. We added complete tooltip support for CExtEdit in 2.91.

Offer Har Sep 28, 2010 - 2:32 PM

When is 2.91 supposed to be released? What features will it include?

Technical Support Sep 30, 2010 - 12:42 AM

It’s 90% finished. We are going to introduce HWND-less controls based on HTML like language and trees describing logical structure of control’s inner part. The Office 2010 style Backstage View for ribbon bar is such kind of control.

Offer Har Sep 18, 2010 - 4:14 PM

From my trace window:



  * * * INITIALIZING DYNAMIC LIBRARY: ProfUIS version 2.90 * * * 
  * * * INITIALIZING DYNAMIC LIBRARY: ProfSkin version 2.90 * * *

So I guess I’m using 2.90...

Offer Har Sep 18, 2010 - 3:31 PM

I am using 2.90!

Technical Support Sep 18, 2010 - 9:31 AM

The CExtEditBase::SetTooltipText() method assigns tooltip text to the edit control. This text can be HTML in Prof-UIS 2.90 or later. First of all, we need to load bitmap image into the global object container. This bitmap is the icon to use in the tooltip text formatted as HTML:

CExtRichDocObjectBase & _GC = CExtRichContentLayout::stat_GetObjectCountainerGlobal();
CExtRichDocObjectImage * pObjPic = NULL;
	pObjPic = new CExtRichDocObjectImage( _T("smile.bmp") );
	VERIFY( pObjPic->ImageGet().LoadBMP_Resource( MAKEINTRESOURCE(IDB_SMILE) ) );
	VERIFY( pObjPic->ImageGet().Make32() );
	VERIFY( _GC.ObjectAdd( pObjPic ) );

The code above assumes your app have the IDB_SMILE bitmap resource. We loaded bitmap image into the global object container and we can use it everywhere in any Prof-UIS control. The smile.bmp is the HTML name of this image to use as value of the SRC attribute of the IMG tag. Here is how the tooltip text may look like:
<HTML><IMG SRC=smile.bmp />Some tooltip text.</HTML>

The <HTML> text at start is needed to let Prof-UIS detect the HTML format. Of course, you can use much more complex HTML formatted text as parameter of the CExtEditBase::SetTooltipText() method. You can use HTML <TABLE>s for compound content formating. You can use fixed and absolutely positioned elements. You can use inline type of tables and blocks provided by the display:inline-table and display:inline-block CSS attributes. Prof-UIS 2.91 adds support for the float:left and float:right CSS attributes what allows to dock images to the left or right sides of text paragraphs. You can test your HTML in the RichContentFeatures sample application before using it in your project.

Offer Har Sep 18, 2010 - 11:40 AM

Dear Support,


I managed to see the string, but it still is not HTML formatted, only the text I inserted... <HTML><B>RON</B> RON</HTML>.


Also, I would like the tooltip to be displayed on top at a fixed location with a balloon-like tooltip - is it possible?


I need also the tooltip to be displayed until I close it from the code (calling to Hide) - is it possible?


Thanks,


Ron.


 

Offer Har Sep 18, 2010 - 10:54 AM

Dear Support,


I replaced my line with this one:


SetTooltipText("<HTML><B>RON</B> RON</HTML>");


But now I don’t see any tooltip, before it worked, but was a very basic tooltip. Do I need to add any initialization code?


Also, how can I get the balloon shape?


Is there any place with a sample of this?


Thanks,


Ron.