FIELD Selector for FiveWin ?

FIELD Selector for FiveWin ?

Postby Jimmy » Sat Jul 30, 2022 5:35 am

hi,

is there a FiveWin Sample like this ?
Image
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FIELD Selector for FiveWin ?

Postby Otto » Sat Jul 30, 2022 6:55 am

Hello Jimmy,
You could use the FW example as a start.

Another question: you also know MINIGUI.
Do you think you can use the dialog designer as well for FIVEWIN and maybe HTML forms?
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


Best regards,
Otto

C:\FWH\samples\dragdrop3.prg

Code: Select all  Expand view



    // 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

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: FIELD Selector for FiveWin ?

Postby Euclides » Sat Jul 30, 2022 4:26 pm

Hi Jimmy.
There is a FWH function: cGetExpression()
It user \fwh\samples\expbuild.rc and \fwh\samples\ExpBuild.ch. The use is for expressions.
I made a very simple routine (back in fw 2.0 - Just transalte it from Portugese)
Code: Select all  Expand view

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
}
*/

 

Hope it helps. Regards Euclides
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: FIELD Selector for FiveWin ?

Postby Jimmy » Sun Jul 31, 2022 12:30 am

hi Euclides,

thx for Answer.
Euclides wrote:There is a FWH function: cGetExpression()

OK, i will look for it
[quote="Euclides"]It user \fwh\samples\expbuild.rc and \fwh\samples\ExpBuild.ch. The use is for expressions./quote]
i have look into expbuild.ch and expbuild.rc
i don´t know how to use your Code Sample as i have not work with REDEFINE yet.

where can i read more about REDEFINE to learn :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FIELD Selector for FiveWin ?

Postby Antonio Linares » Sun Jul 31, 2022 12:46 am

Dear Jimmy,

Simply create this example:

jimmy.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   MsgInfo( cGetExpression() )

return nil

Then, being at FWH\samples do:

copy expbuild.rc jimmy.rc

Finally do:
buildh.bat jimmy

And you get this:
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FIELD Selector for FiveWin ?

Postby Jimmy » Sun Jul 31, 2022 4:41 am

hi Antonio,
Antonio Linares wrote:And you get this:
WOW
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: FIELD Selector for FiveWin ?

Postby Jimmy » Sun Jul 31, 2022 4:46 am

hi Otto,
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?

thx for your DragDrop Sample.

---

when try to use HMG FMG Syntax in MiniGUI Extended Version it (most) fail as Property are Different
i guess it will be a huge work to get all FiveWin Control and its Property

remember MiniGUI Form-Designer is 2-Way
Note : all Property must exist when "read" again (after manual modify Source)

---

about HTML :
i do not know anything about HTML so i can´t talk about it
but HTML have so much Property ... how much work will it be ...
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests