Tooltip with multiline

Moderator: Rathinagiri

User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Tooltip with multiline

Post by Amarante »

Is there any way to use the tooltip with multiline?
Something like:
TOOLTIP "xxxx" + CHR (10) + "yyy"

Thank you for your attention.
---

Existe alguma maneira de usar o tooltip com multilinhas?
Algo como:
TOOLTIP "xxxx" + CHR( 10 ) + "yyy"

Obrigado pela atenção.
[u]Moderator Notes[/u] (Pablo César) wrote:This topic was splitted and moved from HMG Wishlist.
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: ToolTip in IMAGE control

Post by danielmaximiliano »

Amarante wrote:Hi Esgici
By the same tooltip:
Is there any way to use the tooltip with multiline?
Something like:
TOOLTIP "xxxx" + CHR (10) + "yyy"

Thank you for your attention.
---

Olá Esgici
Aproveitando o assunto tooltip:
Existe alguma maneira de usar o tooltip com multilinhas?
Algo como:
TOOLTIP "xxxx" + CHR( 10 ) + "yyy"

Obrigado pela atenção.
Hola / Hi Amarante :
intente asi / Try

Code: Select all

 BUTTON Configurar ;
            CAPTION "Configurar" ;
            PICTURE "Configurar" ;
            ACTION { Configurar() } ;
            TOOLTIP "Configurar Scanner e Impresora" + CHR( 10 ) + CHR( 13 ) + ;
					         "si tiene mal funcionamiento estara indicado " + CHR( 10 ) + CHR( 13 ) + ;
							 "En esta linea de estado " ;
            SEPARATOR
tooltips 2.jpg
tooltips 2.jpg (132.03 KiB) Viewed 5603 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: ToolTip in IMAGE control

Post by Amarante »

Hi danielmaximiliano,
Does not work on Grid. :(
Already tested chr (13) + chr (10) and also chr (10) + chr (13).
Routines Messaging (MsgInfo, etc.) I only use chr (10) successfully.

---

Oi danielmaximiliano,
Não funciona em Grid. :(
Já testei chr(13) + chr(10) e também chr(10)+chr(13).
Nas rotinas de Mensagens (MsgInfo, etc) eu uso somente chr(10) com sucesso.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: ToolTip in IMAGE control

Post by Pablo César »

Olá Amarante,

No exemplo View_Build_Log.prg utilizo em grid mas com CRLF.

Abraços

---

In View_Build_Log.prg is used with CRLF to break lines.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: ToolTip in IMAGE control

Post by Amarante »

Pablo César wrote:Olá Amarante,

No exemplo View_Build_Log.prg utilizo em grid mas com CRLF.

Abraços

---

In View_Build_Log.prg is used with CRLF to break lines.
Pablo,
I'm confused in your example, I recompiled with the HMG version 3.1.5 that I have installed, fully works.
But see with this little test, does not work!

Code: Select all

#include "hmg.ch"

Function Main
Local aTest := { { "a", "b", "c" } }
#define CRLF                          Chr(13)+Chr(10)

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 450 ;
		HEIGHT 400 ;
		TITLE 'Hello World!' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'File'
				MENUITEM 'Change ItemCount' ACTION Form_1.Grid_1.ItemCount := Val(InputBox('New Value','Change ItemCount'))
			END POPUP
		END MENU

  DEFINE GRID Grid_1
    ROW 10
    COL 10
		WIDTH 400
		HEIGHT 330
		HEADERS {'Column 1','Column 2','Column 3'}
		WIDTHS {140,140,140}
		ITEMS aTest
    TOOLTIP ;
      "Text 1" + ;
      CRLF + ;
      "Text 2" + ;
      CRLF + ;
      "Text 3"
  END GRID

	END WINDOW

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return
---

Estou confuso no seu exemplo, que eu recompilei com a versão HMG 3.1.5 que tenho instalada, funciona plenamente.
Mas veja com esse pequeno teste, não funciona!
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: ToolTip in IMAGE control

Post by Amarante »

Oops, :o
I saw this line in your example:
SendMessage (GetFormToolTipHandle ("Form_1") TTM_SETMAXTIPWIDTH, 0, 168)
And I changed my example and it worked! :D

Code: Select all

#include "hmg.ch"

Function Main
Local aTest := { { "a", "b", "c" } }
#define CRLF                          Chr(13)+Chr(10)
#define WM_USER                      0x400
#define TTM_SETMAXTIPWIDTH           (WM_USER + 24)

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 450 ;
		HEIGHT 400 ;
		TITLE 'Hello World!' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'File'
				MENUITEM 'Change ItemCount' ACTION Form_1.Grid_1.ItemCount := Val(InputBox('New Value','Change ItemCount'))
			END POPUP
		END MENU

  DEFINE GRID Grid_1
    ROW 10
    COL 10
		WIDTH 400
		HEIGHT 330
		HEADERS {'Column 1','Column 2','Column 3'}
		WIDTHS {140,140,140}
		ITEMS aTest
    TOOLTIP ;
      "Text 1" + ;
      CRLF + ;
      "Text 2" + ;
      CRLF + ;
      "Text 3"
  END GRID

	END WINDOW
SendMessage( GetFormToolTipHandle ("Form_1"), TTM_SETMAXTIPWIDTH, 0, 168)

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return
---

Ops, :o
Vi essa linha em seu exemplo:
SendMessage( GetFormToolTipHandle ("Form_1"), TTM_SETMAXTIPWIDTH, 0, 168)
E mudei o meu exemplo e funcionou! :D
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: ToolTip in IMAGE control

Post by danielmaximiliano »

Amarante :
estab revisando como enviar un mensaje al control para incrementar la capacidad de dicho control
y vi que Pablo respondio su pregunta... :D

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

desde ya un abrazo
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: ToolTip in IMAGE control

Post by Amarante »

esgici wrote:Hi All

IMAGE control support ACTION | ONCLICK | ON CLICK events;

Is not it good to support TOOLTIP too :?:

Regards
Friend esgici
Sorry I used your post to solve my problem.
I hope it has not offended. :roll:
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Tooltip with multiline

Post by Amarante »

danielmaximiliano wrote:Amarante :
estab revisando como enviar un mensaje al control para incrementar la capacidad de dicho control
y vi que Pablo respondio su pregunta... :D

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

desde ya un abrazo
Gracias Daniel
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: ToolTip in IMAGE control

Post by danielmaximiliano »

Hola claudio :
cuando creo/defino un control Image le otorgo un nombre, pero cuando utilizo

Code: Select all

*-------------------------------------------------------------*
PROCEDURE ON_INIT_Principal()
*-------------------------------------------------------------*
Local cControlName 
Local cFormParentName := "Principal"
   hBitmap := BT_BitmapLoadFile ( "LosTilos" )
RETURN

*-------------------------------------------------------------*
PROCEDURE ON_PAINT_Principal()
*-------------------------------------------------------------*
LOCAL hDC, BTstruct
   hDC := BT_CreateDC ( "Principal" , BT_HDC_INVALIDCLIENTAREA , @BTstruct)
  [b] BT_DrawBitmap ( hDC , 165 ,   5 , 990            , 500           , BT_STRETCH  , hBitmap )[/b]
   BT_DeleteDC    ( BTstruct )
RETURN
¿ como se que nombre tiene dicha imagen ? o ¿ tengo que crearla como Control de HMG ?
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply