Page 1 of 4

Tooltip with multiline

Posted: Tue Sep 03, 2013 10:23 pm
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.

Re: ToolTip in IMAGE control

Posted: Tue Sep 03, 2013 11:05 pm
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 5671 times

Re: ToolTip in IMAGE control

Posted: Tue Sep 03, 2013 11:23 pm
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.

Re: ToolTip in IMAGE control

Posted: Tue Sep 03, 2013 11:53 pm
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.

Re: ToolTip in IMAGE control

Posted: Wed Sep 04, 2013 12:22 am
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!

Re: ToolTip in IMAGE control

Posted: Wed Sep 04, 2013 12:31 am
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

Re: ToolTip in IMAGE control

Posted: Wed Sep 04, 2013 12:41 am
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

Re: ToolTip in IMAGE control

Posted: Wed Sep 04, 2013 12:42 am
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:

Tooltip with multiline

Posted: Wed Sep 04, 2013 12:43 am
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

Re: ToolTip in IMAGE control

Posted: Wed Sep 04, 2013 1:23 am
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 ?