Page 1 of 1

Edit con Button

PostPosted: Fri Jan 26, 2018 12:02 pm
by Xevi
Cómo puedo mostrar un botón en un EDIT

Si bien veo que existe el método bLButtonup, que supongo seria el encargado de realizar lo que se le mande, no veo como mostrar ese button

Cogiendo el ejemplo de FW, edit.prg... cómo hago que uno de esos EDITs tenga el botoncillo a al derecha???


Code: Select all  Expand view

// Testing Class TEdit that implements GETs without using a Harbour embedded GET

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oDlg, cFirst := "Hello", cLast := "World"

   DEFINE DIALOG oDlg SIZE 500, 250
   
   @ 1, 1 EDIT cFirst OF oDlg SIZE 80, 10
   
   @ 2, 1 EDIT cLast OF oDlg SIZE 80, 10

   @ 5, 11 BUTTON "Ok" ACTION MsgInfo( cFirst + ", " + cLast )

   @ 5, 21 BUTTON "Cancel" ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

return nil

//----------------------------------------------------------------------------//
 

Re: Edit con Button

PostPosted: Fri Jan 26, 2018 12:32 pm
by Xevi
Seria como ...

Code: Select all  Expand view

// Testing Class TEdit that implements GETs without using a Harbour embedded GET

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oDlg, cFirst := "Hello", cLast := "World"
Local oBtn

   DEFINE DIALOG oDlg SIZE 500, 250
   
   @ 1, 1 EDIT cFirst OF oDlg SIZE 80, 10
   @ 0.75, 14.8 BUTTON oBtn PROMPT "..." OF oDlg SIZE 8, 8
   
   @ 2, 1 EDIT cLast OF oDlg SIZE 80, 10

   @ 5, 11 BUTTON "Ok" ACTION MsgInfo( cFirst + ", " + cLast )

   @ 5, 21 BUTTON "Cancel" ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

return nil

//----------------------------------------------------------------------------//
 


De esta manera "ya me sirve", pero lo suyo es tener el botón "integrado" dentro del EDIT.

Vaya... un EDITBUTTON

Gracias.

Re: Edit con Button

PostPosted: Fri Jan 26, 2018 12:33 pm
by karinha
debería funcionar asi, pero no funciona com EDIT.

Code: Select all  Expand view

   @ 10,10 EDIT oEdit1 VAR cFirst bitmap "..\bitmaps\on.bmp" action( msginfo( "With Transparent" ) ) ;
           OF oDlg SIZE 80,10

   oEdit1:lBtnTransparent := .T.       // transparent button get oEdit1
   oEdit1:lAdjustBtn      := .T.       // Button Get Adjust Witdh oEdit1
   oEdit1:lDisColors      := .F.       // Deactive disable color
   oEdit1:nClrTextDis     := CLR_WHITE // Color text disable status
   oEdit1:nClrPaneDis     := CLR_BLUE  // Color Pane disable status
 



Saludos

Re: Edit con Button

PostPosted: Sun Jan 28, 2018 6:10 pm
by nageswaragunupudi
In this way "and serves me", but his is to have the "integrated" into the EDIT button.

Not provided.
Need to use Get if that feature is required.