Edit con Button

Post Reply
User avatar
Xevi
Posts: 168
Joined: Wed Nov 29, 2017 11:42 am
Location: Girona

Edit con Button

Post 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

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

//----------------------------------------------------------------------------//
 
Un Saludo,
Xevi.

Aprendiz de la vida!!!
User avatar
Xevi
Posts: 168
Joined: Wed Nov 29, 2017 11:42 am
Location: Girona

Re: Edit con Button

Post by Xevi »

Seria como ...

Code: Select all

// 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.
Un Saludo,
Xevi.

Aprendiz de la vida!!!
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Edit con Button

Post by karinha »

debería funcionar asi, pero no funciona com EDIT.

Code: Select all

   @ 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
João Santos - São Paulo - Brasil
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Edit con Button

Post 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.
Regards

G. N. Rao.
Hyderabad, India
Post Reply