hi,
is there a FiveWin Sample like this ?
Ivanil Marcelino
Good afternoon;
I don't know fivewin, but I believe the syntax differs from minigui;
the minigui syntax model for graphical objects is:
define window
define textbox cName
row 10
col 10
width 50
height 20
end textbox
end window
// FiveWin - own Drag&Drop new features !!!
// Drag item from one listbox to another listbox
#include "FiveWin.ch"
#include "xbrowse.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oCursor, oLbx, oLbx2
local cItem:=""
DEFINE CURSOR oCursor hand
DEFINE WINDOW oWnd TITLE "FiveWin's own Drag & Drop features!!!"
@ 6, 3 XBROWSE oLbx OF oWnd COLUMNS 1 ;
ARRAY { "Item 1","Item 2","Item 3","Item 4" } SIZE 200, 200
// Set a DropOver action for the ListBox
oLbx:bDropOver = { | uDropInfo, nRow, nCol, nKeyFlags | ;
AAdd( oLbx:aArrayData, oLbx2:aArrayData[ uDropInfo ] ), ;
ADel( oLbx2:aArrayData, uDropInfo, .t. ), ;
oLbx:Refresh(.t.), oLbx2:Refresh(.t.) }
oLbx:oDragCursor = oCursor // Select a Drag cursor
oLbx:bDragBegin = { | nRow, nCol, nKeyFlags | ;
SetDropInfo( oLbx:nArrayAt ),; // Save drop info !!!
oWnd:SetMsg( "Dragging..." ) }
@ 6, 30 XBROWSE oLbx2 OF oWnd COLUMNS 1 ARRAY {} size 200,200
oLbx2:bDropOver = { | uDropInfo, nRow, nCol, nKeyFlags | ;
AAdd( oLbx2:aArrayData, oLbx:aArrayData[ uDropInfo ] ), ;
ADel( oLbx:aArrayData, uDropInfo, .t. ), ;
oLbx:Refresh(.t.), oLbx2:Refresh(.t.) }
oLbx2:oDragCursor = oCursor // Select a Drag cursor
oLbx2:bDragBegin = { | nRow, nCol, nKeyFlags | ;
SetDropInfo( oLbx2:nArrayAt ),; // Save drop info !!!
oWnd:SetMsg( "Dragging..." ) }
oLbx:CreateFromCode()
oLbx2:CreateFromCode()
// Set a DropOver action for the ListBox
SET MESSAGE OF oWnd ;
TO "FiveWin - own DragDrop interface !!!" CENTER
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
Function MOVFIELDS()
local oDlg1, oLbx1, oLbx2, aItm2:={}, cX, cTit
local aItm1:={"HUMBERTO", "NASCIMENTO", "ROBERTO SCHAFF", "TEREZINHA", "CAZUZA", "CLAUDIO NINGA", "RENATO", "MARCELO ALEIXO", "AGAMENON", "RICIERI"}
*
DEFINE DIALOG oDlg1 RESOURCE "DLGASP3"
REDEFINE LISTBOX oLbx1 VAR cX ITEMS aItm1 ID 101 OF oDlg1 // ON CHANGE iif(aScan(aItm2, cX)=0, (oLbx2:Add(cX), cTit:=cX),)
oLbx1:bLDblClick:={|nRow,nCol| iif(aScan(aItm2, cX)=0, (oLbx2:Add(cX), cTit:=cX),)}
REDEFINE LISTBOX oLbx2 VAR cTit ITEMS aItm2 ID 102 OF oDlg1
REDEFINE BUTTON ID 11 OF oDlg1 ACTION oDlg1:End(1)
REDEFINE BUTTON ID 12 OF oDlg1 ACTION oDlg1:End()
REDEFINE BUTTON ID 13 OF oDlg1 ACTION (oLbx2:Del(aScan(aItm2, cTit)), oLbx2:GoTop())
REDEFINE BUTTON ID 14 OF oDlg1 ACTION iif(aScan(aItm2, cX)=0, (oLbx2:Add(cX), cTit:=cX),)
ACTIVATE DIALOG oDlg1 CENTER ON INIT cX := aItm1[1]
return nil
/*. RC
DLGASP3 DIALOG 2, -1, 223, 118
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION " Seleção de Destinatários"
FONT 8, "MS Sans Serif"
{
LTEXT "Usuários", -1, 8, 3, 37, 9
PUSHBUTTON "&Incluir", 14, 94, 29, 35, 12, NOT WS_TABSTOP
LTEXT "Destinatários", -1, 137, 3, 44, 9
PUSHBUTTON "&Retirar", 13, 94, 51, 35, 12, NOT WS_TABSTOP
LISTBOX 102, 138, 15, 75, 78, LBS_STANDARD
PUSHBUTTON "&Ok", 11, 68, 100, 40, 14
PUSHBUTTON "&Cancela", 12, 121, 100, 40, 14
LISTBOX 101, 8, 15, 75, 78, LBS_STANDARD
}
*/
Euclides wrote:There is a FWH function: cGetExpression()
#include "FiveWin.ch"
function Main()
MsgInfo( cGetExpression() )
return nil
WOWAntonio Linares wrote:And you get this:
Otto wrote:Another question: you also know MINIGUI.
Do you think you can use the dialog designer as well for FIVEWIN and maybe HTML forms?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: nageswaragunupudi and 83 guests