Source language: Translate to:

My 'Drop&Drag' (Sample)

General questions about NeoBook

Moderator: Neosoft Support

My 'Drop&Drag' (Sample)

Postby virger » Thu Feb 19, 2015 3:50 pm

Nada que hacer !!!
Si NO tengo 'Drag & Drop' se lo AGREGO
En nueva applicacion inserte este codigo
En 'PIC' indicar la '[IMAGE]'
Code: Select all
{NeoBook 5 Objects}
NeoBookVer=5.80
ObjectType=3
Name=ButtonSample
X=291
Y=167
W=68
H=41
Anchor=0
Text=[Accion]
Align=2
Key=116
ImageStyle=0
ObjAction=GoSub "Size"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
ObjRAction=GoSub "Move"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=4
ObjectType=15
Name=Timer
X=141
Y=13
W=32
H=32
Anchor=0
AutoStart=No
Interval=1000
ObjAction=GetMousePos "[MousePosX]" "[MousePosY]"¶If "[Accion]" "=" "Rezise"¶    Math "Abs([ObjPosX]-[MousePosX]-2)" "" "[MousePosX]"¶    Math "Abs([ObjPosY]-[MousePosY]-2)" "" "[MousePosY]"¶    SizeObject "[Obj]" "[MousePosX]" "[MousePosY]"¶Else¶    Math "[MousePosX]-[ObjWidth]" "" "[MousePosX]"¶    Math "[MousePosY]-[ObjHeight]" "" "[MousePosY]"¶    MoveObject "[Obj]" "[MousePosX]" "[MousePosY]"¶EndIf
ObjectType=3
Name=Button2
X=526
Y=365
W=68
H=41
Anchor=0
Text=[Accion]
Align=2
ImageStyle=0
ObjAction=GoSub "Size"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
ObjRAction=GoSub "Move"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=3
ObjectType=8
Name=Texto
X=75
Y=301
W=132
H=63
Anchor=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red0\green0\blue0;}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\margh720\margf720{\*\pnseclvl1\pnucrm\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl2\pnucltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl3\pndec\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl4\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{)}}}¶{\*\pnseclvl5\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl6\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl7\pnlcrm\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl8\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl9\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶\endnhere\sectdefaultcl{\pard{\qc\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 [Accion]}}¶}
HMargin=20
VMargin=20
ObjAction=GoSub "Size"
ObjRAction=SetVar "[Obj]" "[Self]"¶GoSub "Move"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
TabOrder=6
ObjectType=4
Name=Pic1
X=379
Y=39
W=64
H=71
Anchor=0
FileName=[Image]
PictStyle=2
Centered=Yes
Resample=Yes
ObjAction=GoSub "Size"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
ObjRAction=GoSub "Move"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
TabOrder=7
ObjectType=8
Name=Inf
X=0
Y=0
W=144
H=128
Anchor=0
Font=Arial
FontSize=9
FontStyle=2
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red0\green0\blue0;}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\margh720\margf720{\*\pnseclvl1\pnucrm\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl2\pnucltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl3\pndec\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl4\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{)}}}¶{\*\pnseclvl5\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl6\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl7\pnlcrm\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl8\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl9\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶\endnhere\sectdefaultcl{\pard{\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Current\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i \tab Action :\plain\f0\fs18\cf0\b\ul\i [Accion]\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i \tab Object :\plain\f0\fs18\cf0\b\ul\i [Obj]\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\ul\i                                             \par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Left Click   = Rezise\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Right Click = Move\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0\i \par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Right/Left Click = Stop}}¶}
HMargin=0
VMargin=0
LineColor=0
LineWidth=0
LineStyle=0
FillColor=16777215
FillPattern=0
TabOrder=5


Gracias por Leerme
COSTA RICA
PURA VIDA
User avatar
virger
 
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: My 'Drop&Drag' (Sample)

Postby Danito » Fri Feb 20, 2015 11:46 am

Quise probar el ejemplo pero no hallé las subrutinas :(
User avatar
Danito
 
Posts: 51
Joined: Thu Mar 11, 2010 7:07 pm

MIL DISCULPAS---My 'Drop&Drag' (Sample)

Postby virger » Fri Feb 20, 2015 12:24 pm

Le pido las disculpas del caso, mi gran error. Aqui estan

Code: Select all
:ObjIn
If "[Obj]" "=" ""
    SetVar "[Obj]" "[Self]"
EndIf
Return

:ObjOut
If "[Accion]" "=" ""
    SetVar "[Obj]" ""
EndIf
Return


:Move
If "[Accion]" "=" ""
    GetObjectInfo "[Obj]" "Left"   "[ObjPosX]"
    GetObjectInfo "[Obj]" "Top"    "[ObjPosY]"
    GetObjectInfo "[Obj]" "Width"  "[ObjWidth]"
    GetObjectInfo "[Obj]" "Height" "[ObjHeight]"
    Math "[ObjWidth]/2" "" "[ObjWidth]"
    Math "[ObjHeight]/2" "" "[ObjHeight]"
    SetMousePos "[ObjPosX]+[ObjWidth]" "[ObjPosY]+[ObjHeight]"
    Delay "10"
    SetVar "[Accion]" "Move"
    TimerStart "Timer" "25"
Else
    SetVar "[Accion]" ""
    TimerStop "Timer"
EndIf
Return

:Size
If "[Accion]" "=" ""
    GetObjectInfo "[Obj]" "Left"   "[ObjPosX]"
    GetObjectInfo "[Obj]" "Top"    "[ObjPosY]"
    GetObjectInfo "[Obj]" "Width"  "[ObjWidth]"
    GetObjectInfo "[Obj]" "Height" "[ObjHeight]"
    SetMousePos "[ObjWidth]+[ObjPosX]-2" "[ObjHeight]+[ObjPosY]-2"
    Delay "10"
    SetVar "[Accion]" "Rezise"
    TimerStart "Timer" "25"
Else
    SetVar "[Accion]" ""
    TimerStop "Timer"
EndIf
Return

Gracias por Leerme
COSTA RICA
PURA VIDA
User avatar
virger
 
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

My 'Drop&Drag' (Sample)--TODO JUNTO

Postby virger » Fri Feb 20, 2015 12:30 pm

Como codigo:
Parte #1 SUB-RUTINAS (GoSubs)
Parte #2 El codigo

PARTE #1
Code: Select all
:ObjIn
If "[Obj]" "=" ""
    SetVar "[Obj]" "[Self]"
EndIf
Return

:ObjOut
If "[Accion]" "=" ""
    SetVar "[Obj]" ""
EndIf
Return


:Move
If "[Accion]" "=" ""
    GetObjectInfo "[Obj]" "Left"   "[ObjPosX]"
    GetObjectInfo "[Obj]" "Top"    "[ObjPosY]"
    GetObjectInfo "[Obj]" "Width"  "[ObjWidth]"
    GetObjectInfo "[Obj]" "Height" "[ObjHeight]"
    Math "[ObjWidth]/2" "" "[ObjWidth]"
    Math "[ObjHeight]/2" "" "[ObjHeight]"
    SetMousePos "[ObjPosX]+[ObjWidth]" "[ObjPosY]+[ObjHeight]"
    Delay "10"
    SetVar "[Accion]" "Move"
    TimerStart "Timer" "25"
Else
    SetVar "[Accion]" ""
    TimerStop "Timer"
EndIf
Return

:Size
If "[Accion]" "=" ""
    GetObjectInfo "[Obj]" "Left"   "[ObjPosX]"
    GetObjectInfo "[Obj]" "Top"    "[ObjPosY]"
    GetObjectInfo "[Obj]" "Width"  "[ObjWidth]"
    GetObjectInfo "[Obj]" "Height" "[ObjHeight]"
    SetMousePos "[ObjWidth]+[ObjPosX]-2" "[ObjHeight]+[ObjPosY]-2"
    Delay "10"
    SetVar "[Accion]" "Rezise"
    TimerStart "Timer" "25"
Else
    SetVar "[Accion]" ""
    TimerStop "Timer"
EndIf
Return



PARTE #2
Code: Select all
{NeoBook 5 Objects}
NeoBookVer=5.80
ObjectType=3
Name=ButtonSample
X=291
Y=167
W=68
H=41
Anchor=0
Text=[Accion]
Align=2
Key=116
ImageStyle=0
ObjAction=GoSub "Size"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
ObjRAction=GoSub "Move"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=4
ObjectType=15
Name=Timer
X=141
Y=13
W=32
H=32
Anchor=0
AutoStart=No
Interval=1000
ObjAction=GetMousePos "[MousePosX]" "[MousePosY]"¶If "[Accion]" "=" "Rezise"¶    Math "Abs([ObjPosX]-[MousePosX]-2)" "" "[MousePosX]"¶    Math "Abs([ObjPosY]-[MousePosY]-2)" "" "[MousePosY]"¶    SizeObject "[Obj]" "[MousePosX]" "[MousePosY]"¶Else¶    Math "[MousePosX]-[ObjWidth]" "" "[MousePosX]"¶    Math "[MousePosY]-[ObjHeight]" "" "[MousePosY]"¶    MoveObject "[Obj]" "[MousePosX]" "[MousePosY]"¶EndIf
ObjectType=3
Name=Button2
X=526
Y=365
W=68
H=41
Anchor=0
Text=[Accion]
Align=2
ImageStyle=0
ObjAction=GoSub "Size"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
ObjRAction=GoSub "Move"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=3
ObjectType=8
Name=Texto
X=75
Y=301
W=132
H=63
Anchor=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red0\green0\blue0;}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\margh720\margf720{\*\pnseclvl1\pnucrm\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl2\pnucltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl3\pndec\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl4\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{)}}}¶{\*\pnseclvl5\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl6\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl7\pnlcrm\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl8\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl9\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶\endnhere\sectdefaultcl{\pard{\qc\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 [Accion]}}¶}
HMargin=20
VMargin=20
ObjAction=GoSub "Size"
ObjRAction=SetVar "[Obj]" "[Self]"¶GoSub "Move"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
TabOrder=6
ObjectType=4
Name=Pic1
X=379
Y=39
W=64
H=71
Anchor=0
FileName=[Image]
PictStyle=2
Centered=Yes
Resample=Yes
ObjAction=GoSub "Size"
ObjEnterAction=GoSub "ObjIn"
ObjExitAction=GoSub "ObjOut"
ObjRAction=GoSub "Move"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
TabOrder=7
ObjectType=8
Name=Inf
X=0
Y=0
W=144
H=128
Anchor=0
Font=Arial
FontSize=9
FontStyle=2
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red0\green0\blue0;}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\margh720\margf720{\*\pnseclvl1\pnucrm\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl2\pnucltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl3\pndec\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{.}}}¶{\*\pnseclvl4\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb}{\pntxta{)}}}¶{\*\pnseclvl5\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl6\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl7\pnlcrm\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl8\pnlcltr\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶{\*\pnseclvl9\pndec\pnstart1\pnhang\pnindent720{\pntxtb{(}}{\pntxta{)}}}¶\endnhere\sectdefaultcl{\pard{\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Current\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i \tab Action :\plain\f0\fs18\cf0\b\ul\i [Accion]\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i \tab Object :\plain\f0\fs18\cf0\b\ul\i [Obj]\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\ul\i                                             \par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Left Click   = Rezise\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Right Click = Move\par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0\i \par¶\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs18\cf0\i Right/Left Click = Stop}}¶}
HMargin=0
VMargin=0
LineColor=0
LineWidth=0
LineStyle=0
FillColor=16777215
FillPattern=0
TabOrder=5
COSTA RICA
PURA VIDA
User avatar
virger
 
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 3 guests

cron