Power Builder - Sobre DragAuto

 
Vista:

Sobre DragAuto

Publicado por anonimo (70 intervenciones) el 17/08/2007 17:55:05
Buenos dias a todos
Par mover un ccontrol en tiempo de jecucuion
se tiene q scribir codigo
aparte de activar la propiedada dragauto
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Sobre DragAuto

Publicado por Leopoldo Taylhardat (710 intervenciones) el 17/08/2007 21:36:06
SI!!!! debes colocar el código de lo que va a hacer la aplicación en el evento de dragdrop...

This example for the DragDrop event for a DataWindow checks whether the source object is a DataWindow control. If so, it finds out the current row in the source and moves it to the target:

DataWindow ldw_Source

IF source.TypeOf() = DataWindow! THEN

ldw_Source = source
IF row > 0 THEN
ldw_Source.RowsMove(row, row, Primary!, &
This, 1, Primary!)
END IF

END IF
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Sobre DragAuto

Publicado por anonimo (70 intervenciones) el 18/08/2007 17:41:56
Gracias Leopoldo
y en el caso de q quiero mover un control como un picture
donde pongo el codigo , y cual es el codigo

Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Sobre DragAuto

Publicado por Leopoldo Taylhardat (710 intervenciones) el 20/08/2007 16:24:32
Example 1 In this example from the w_orderentry window in the ABNC sample application, this code in the DoubleClicked event for the DataWindow dw_orddetail starts a drag operation:

IF dw_orddetail.GetRow() > 0 THEN

dw_orddetail.Drag(Begin!)
This.DragIcon = "dragitem.ico"

END IF

Then in the DragDrop event for a trashcan Picture control, this code deletes the row the user clicked and dragged from the DataWindow control:

long ll_currow

dwitemstatus ldwis_delrow

ll_currow = dw_orddetail.GetRow( )

// Save the row's status flag for later use

ldwis_delrow = dw_orddetail.GetItemStatus &
(ll_currow, 0, Primary!)

// Now, delete the current row from dw_orddetail

dw_orddetail.DeleteRow(0)

Example 2 This example for a trashcan Picture control's DragDrop event checks whether the source of the drag operation is a DataWindow. If so, it asks the user whether to delete the current row in the source DataWindow:

DataWindow ldw_Source

Long ll_RowToDelete

Integer li_Choice

IF source.TypeOf() = DataWindow! THEN

ldw_Source = source
ll_RowToDelete = ldw_Source.GetRow()

IF ll_RowToDelete > 0 THEN
li_Choice = MessageBox("Delete", &
"Delete this row?", Question!, YesNo!, 2)
IF li_Choice = 1 THEN
ldw_Source.DeleteRow(ll_RowToDelete)
END IF
ELSE
Beep(1)
END IF

ELSE
Beep(1)

END IF
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Sobre DragAuto

Publicado por anonimo (70 intervenciones) el 20/08/2007 19:18:30
Ok Leopoldo , ya entendi

Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar