SET TOOLTIPBACKCOLOR

Moderator: Rathinagiri

emzampi
Posts: 106
Joined: Sun Aug 11, 2013 9:00 am

SET TOOLTIPBACKCOLOR

Post by emzampi »

the command SET TOOLTIPBACKCOLOR {255,255,0} with win7 64-bit does not work !! While on win xp works .There is also to you?
does not take the desired color
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

SET TOOLTIPBACKCOLOR

Post by Pablo César »

I tried in Win7 32 bits thru this code and worked for me normally.
Screen1.png
Screen1.png (7.29 KiB) Viewed 6213 times
May you test it in your Win7 at 64 bits ?

Also can you inform with HMG version are you using ? Unicode /ANSI ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: SET TOOLTIPBACKCOLOR

Post by serge_girard »

Thanks, very nice!

Serge
There's nothing you can do that can't be done...
emzampi
Posts: 106
Joined: Sun Aug 11, 2013 9:00 am

Re: SET TOOLTIPBACKCOLOR

Post by emzampi »

I used version is 'HMG 3.3.1' and compiled 32-bit --
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: SET TOOLTIPBACKCOLOR

Post by Pablo César »

Have you tested with that code I passed ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: SET TOOLTIPBACKCOLOR

Post by serge_girard »

W7-32 BITS HMG331 OK!

Serge
There's nothing you can do that can't be done...
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: SET TOOLTIPBACKCOLOR

Post by Javier Tovar »

Win7, 32 bits, HMG3.3.1 No trabaja, Unicode

Saludos

P.D., Ya recompile libreria y nada.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
Win7, 32-bit, HMG3.3.1 not work, Unicode

regards

P. D., Ya library and recompile anything.
ErrorColorToolTip.jpg
ErrorColorToolTip.jpg (28.7 KiB) Viewed 6084 times

Code: Select all

#include "hmg.ch"

Function Main

	SET NAVIGATION EXTENDED
	SET EPOCH TO 2000

	SET CENTURY ON
	SET DATE FRENCH
	SET TOOLTIPSTYLE BALLOON
	SET TOOLTIPBACKCOLOR {255,0,0}

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 640 HEIGHT 480 ;
		TITLE 'HMG Demo' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'Test'
				MENUITEM 'Set Text_1 Value' ACTION Form_1.Text_1.Value := Date()
				MENUITEM 'Set Text_2 Value' ACTION Form_1.Text_2.Value := ctod ('  /  /  ')
				MENUITEM 'Set Text_3 Value' ACTION Form_1.Text_3.Value := ctod('01/01/2005')
				MENUITEM 'Set Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .T.
				MENUITEM 'Clear Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .F.
			SEPARATOR
				MENUITEM 'Get Text_1 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_1.Value ) )
				MENUITEM 'Get Text_2 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_2.Value ) ) 
				MENUITEM 'Get Text_3 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_3.Value ) )
			END POPUP
		END MENU

		@ 10,10 TEXTBOX Text_1 ;
			VALUE ctod('01/01/2004') ;
			TOOLTIP 'Date TextBox 1' ;
			DATE

		@ 40,10 TEXTBOX Text_2 ;
			VALUE Date() ;
			TOOLTIP 'Date TextBox 2' ;
			DATE

		DEFINE TEXTBOX Text_3
			ROW 70
			COL 10
			DATE .T.
		END TEXTBOX

	END WINDOW

	Form_1.Center

	Form_1.Activate

Return Nil

emzampi
Posts: 106
Joined: Sun Aug 11, 2013 9:00 am

Re: SET TOOLTIPBACKCOLOR

Post by emzampi »

Pablo César excuse but I do not know how to enter your code and the example of Javier Tovar does not work to me
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: SET TOOLTIPBACKCOLOR

Post by Pablo César »

emzampi wrote:Pablo César excuse but I do not know how to enter your code and the example of Javier Tovar does not work to me
Please note hereunder quite same Javier's sample code:

Code: Select all

#include <hmg.ch>

#define WM_USER                 0x0400
#define TTM_SETTIPBKCOLOR       (WM_USER + 19)
#define TTM_SETTIPTEXTCOLOR     (WM_USER + 20)

Function Main()
SET TOOLTIPSTYLE BALLOON 
// SET TOOLTIPSTYLE STANDARD

// SET TOOLTIPBACKCOLOR {255,255,0}

DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 640 HEIGHT 480 ;
      TITLE 'HMG Demo' ;
      MAIN 

      DEFINE MAIN MENU
         DEFINE POPUP 'Test'
            MENUITEM 'Set Text_1 Value' ACTION Form_1.Text_1.Value := Date()
            MENUITEM 'Set Text_2 Value' ACTION Form_1.Text_2.Value := ctod ('  /  /  ')
            MENUITEM 'Set Text_3 Value' ACTION Form_1.Text_3.Value := ctod('01/01/2005')
            MENUITEM 'Set Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .T.
            MENUITEM 'Clear Text_1 ReadOnly' ACTION Form_1.Text_1.ReadOnly := .F.
         SEPARATOR
            MENUITEM 'Get Text_1 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_1.Value ) )
            MENUITEM 'Get Text_2 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_2.Value ) ) 
            MENUITEM 'Get Text_3 Value' ACTION MsgInfo ( dtoc ( Form_1.Text_3.Value ) )
         END POPUP
      END MENU

      @ 10,10 TEXTBOX Text_1 ;
         VALUE ctod('01/01/2004') ;
         TOOLTIP 'Date TextBox 1' ;
         DATE

      @ 40,10 TEXTBOX Text_2 ;
         VALUE Date() ;
         TOOLTIP 'Date TextBox 2' ;
         DATE

      DEFINE TEXTBOX Text_3
         ROW 70
         COL 10
		 TOOLTIP 'Date TextBox 3'
         DATE .T.
      END TEXTBOX
END WINDOW
CENTER WINDOW Form_1
SendMessage( GetFormToolTipHandle("Form_1"), TTM_SETTIPBKCOLOR, RGB(255,255,0), 0 )
SendMessage( GetFormToolTipHandle("Form_1"), TTM_SETTIPTEXTCOLOR, RGB(0,92,233), 0 )
ACTIVATE WINDOW Form_1
Return Nil
Please also note lines 51 and 52 and let us know if works for Win7-64bits. Because for me is working perfectly in Win7-32bits (thru SendMessage and also by SET TOOLTIPBACKCOLOR)
Javier Tovar wrote:Win7, 32 bits, HMG3.3.1 No trabaja, Unicode
Javier, puedes probarlo tambien ? Aqui a mi me funciona.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

SET TOOLTIPBACKCOLOR

Post by Pablo César »

I guess this Tooltips doesn't take effects when your Windows has Appearance changed, for example AERO style doesn't work.

In my test, my Windows is setted default (not customed style, Classic one).
Screen1.png
Screen1.png (38.99 KiB) Viewed 6021 times

Estimado Claudio, todo indica que es algo a más que se debe ajustar para no sufrir interferencia del SO. Lo que pude leer es que existe la propiedad OwnerDraw, porque hé visto vários código que se utilizan asi como este y dá cierto:

http://www.codeproject.com/Articles/420 ... th-Image-C

Testeé este ejemplo y mismo personalizando la apariencia del Windows, funciona igual.
Attachments
CustomToolTipDemo.zip
(354.13 KiB) Downloaded 258 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply