Cobol Foro

Cobol Foro (https://www.cobolforo.es/index.php)
-   PowerCOBOL (ActiveX, v4 - v11) (https://www.cobolforo.es/forumdisplay.php?f=9)
-   -   [Compilador] Drag-and-drop de Objetos (https://www.cobolforo.es/showthread.php?t=1672)

Joseg 1 de septiembre de 2023 16:53

Drag-and-drop de Objetos
 
1 Archivos Adjunto(s)
Hola,

Pretendia fazer "arrastar-e-largar de objetos numa janela.
Em anexo um exemplo, mas que não funciona muito bem.
Sabem como fazer?

Gracias,
José

fastpho 1 de septiembre de 2023 22:27

@Joseg
En el evento
Código:

MouseMove
proba con estas lineas
Código COBOL:
  1. *    IF G-IS-DRAG-START THEN
  2. *       move pow-x      to "Left" OF MODELOS
  3. *       move pow-y      to "Top" OF MODELOS
  4. *       MOVE 2  TO "MousePointer"  OF POW-SELF
  5. *    END-IF.
  6.      IF G-IS-DRAG-START THEN
  7.        compute new-tempy =  "Top" OF MODELOS + pow-y - tempy
  8.        compute new-tempx =  "Left" OF MODELOS + pow-x - tempx
  9.        move new-tempy to "Top" OF MODELOS
  10.        move new-tempx to "Left" OF MODELOS
  11.        MOVE 2  TO "MousePointer"  OF pow-self
  12.      END-IF.
Saludos ...


La franja horaria es GMT +2. Ahora son las 02:04.

Powered by: vBulletin, Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.