Page 1 of 1

How Can I Move object "SAY" using class "TGSA

Posted: Tue Jul 31, 2007 5:34 pm
by Gui
/*

Hi Everybody

I want to move object "say" for sample bellow
How Can I active the drag method ?

*/

#include "FiveWin.ch"
#include "Tgsay.ch"

Static oWnd

********
Function Main()
********
Private oBmp
Private oFont, oCursor, cSayTxt := ""
DEFINE Font oFont Name "Arial" WEIGHT 10 SIZE 8,15
DEFINE CURSOR oCursor RESOURCE "Catch"
DEFINE Dialog oWnd FROM 1, 1 TO 22, 75
DEFINE BITMAP oBmp FILE "C:\FWH306\bitmaps\graf01.bmp"
SayTransp()
ACTIVATE DIALOG oWnd ON PAINT ( oWnd:SayBitmap( 0, 0, oBmp, oWnd:nWidth, oWnd:nHeight ) )

Return nil

********
Function SayTransp()
********
Local nl:= 80, nc:= 150, cVarSay := "SAMPLE", oSayTxt, bClick

SET 3DLOOK ON

@ nL,nC GSAY oSayTxt PROMPT cVarSay OF oWnd PIXEL SIZE 90,25 FONT oFont COLOR CLR_RED TRANSPARENTE

oSayTxt:lTabs := .f.
oSayTxt:lSombra := .f.
oSayTxt:oDragCursor := oCursor
oSayTxt:bDragBegin := { | nl, nc, nKeyFlags | SetDropInfo( oSayTxt ), oWnd:SetMsg( "Dragging and Dropping" ) }

Return nil


/*

Thanks !

Gui - São Paulo - Brazil

*/

Posted: Wed Aug 01, 2007 9:36 pm
by Antonio Linares
have you tried ? :

oSayTxt:lDesign := .T.

Re: How Can I Move object SAY using class TGSAY

Posted: Thu Aug 02, 2007 2:41 pm
by Gui
Gui wrote:/*

Thank you for help Mr.Antonio Linares

This soluction don't resolved
I don't archive "MisFunc.ch"
can this to be the problem ?

Thank's

Gui - SP - Brazilian

*/

Posted: Thu Aug 02, 2007 4:54 pm
by Antonio Linares
> I don't archive "MisFunc.ch"

What is it that file ?

Posted: Thu Aug 02, 2007 9:53 pm
by jose_murugosa
I didn´t have that file eather, you can resolve this problem just adding to TGSAY.CH: "#define accion ON CLICK" or changing ACCION for ON CLICK.
In the sample code remove "#include misfunc.ch" and replace CLR_OBLUE with CLR_BLUE and It will work properly.

You can get the corrected code from my "box":

http://www.box.net/shared/lck9effuyn

In this place you will find all the free classes I have (This classes are not mine!!, but their authors agree to share them freely)

I hope this will help, and... sorry for my bad english