Page 1 of 1

control exceeds size in run time RESOLVED

Posted: Mon Feb 15, 2021 12:49 am
by artu01
Hi guys, I don't understand Why the control buttonbar appreciate more large than the normal?

Imageimagenes online

Into the pelles you can notice that the control is smaller than the program in run time

Image

source code

Code: Select all

REDEFINE BUTTONBAR oBar ID 100 OF oFld:aDialogs[3] 2007 TRANSPARENT    

   DEFINE BUTTON OF oBar PROMPT "Add"     FILE "c:\1712\fwh\bitmaps\32x32\new.bmp" ACTION ( IIF(cCodpag='02', AddRow(oBrwC), MsgAlert("Condicion de pago no es a Credito")), oBrwC:SetFocus() )  
   DEFINE BUTTON OF oBar PROMPT "Delete"  FILE "c:\1712\fwh\bitmaps\delete.bmp" ACTION ( IIF(cCodpag='02', DeleteRow(oBrwC), MsgAlert("Condicion de pago no es a Credito")), oBrwC:SetFocus() )


    REDEFINE XBROWSE oBrwC                  ;
      COLUMNS 1, 2                          ;
      HEADERS "Fecha","Importe"             ;
      COLSIZES 70, 100                      ;
      ARRAY {} LINES FASTEDIT CELL FOOTERS  ;
     ID 4018 OF oFld:aDialogs[3]            ;                                    
     UPDATE

      oBrwC:aCols[ 1 ]:nEditType     := EDIT_GET

      WITH OBJECT oBrwC:aCols[ 2 ]
         :nEditType     := EDIT_GET
         :nFooterType   := AGGR_SUM
         :nFootStrAlign := AL_RIGHT
      END
      oBrwC:MakeTotals()
 
I hope you can help me, thanks

Re: control exceeds size in run time

Posted: Mon Feb 15, 2021 6:33 am
by nageswaragunupudi
Buttonbar always extends to the full width of the window/dialog.

Re: control exceeds size in run time

Posted: Mon Feb 15, 2021 10:10 am
by richard-service
Hi
I use this code.

Code: Select all

LOCAL oRect := ::oDlg:GetCliRect()

::oDlgBar := TBar():NewAt( oRect:nTop+60, 00, 486, 42, 40, 40, ::oDlg, .F., , )
 

Re: control exceeds size in run time

Posted: Fri Feb 19, 2021 11:54 pm
by artu01
thank you Mr. Rao y Richard-Service for his reponse

Re: control exceeds size in run time

Posted: Wed Mar 03, 2021 3:48 pm
by artu01
I resolved of this way:

source code

Code: Select all

REDEFINE BUTTONBAR oBar ID 100 OF oFld:aDialogs[3] 2007 TRANSPARENT    

   DEFINE BUTTON OF oBar PROMPT "Add"     FILE "c:\1712\fwh\bitmaps\32x32\new.bmp" ACTION ( IIF(cCodpag='02', AddRow(oBrwC), MsgAlert("Condicion de pago no es a Credito")), oBrwC:SetFocus() )  
   DEFINE BUTTON OF oBar PROMPT "Delete"  FILE "c:\1712\fwh\bitmaps\delete.bmp" ACTION ( IIF(cCodpag='02', DeleteRow(oBrwC), MsgAlert("Condicion de pago no es a Credito")), oBrwC:SetFocus() )


    REDEFINE XBROWSE oBrwC                  ;
      COLUMNS 1, 2                          ;
      HEADERS "Fecha","Importe"             ;
      COLSIZES 70, 100                      ;
      ARRAY {} LINES FASTEDIT CELL FOOTERS  ;
     ID 4018 OF oFld:aDialogs[3]            ;                                    
     UPDATE

      oBrwC:aCols[ 1 ]:nEditType     := EDIT_GET

      WITH OBJECT oBrwC:aCols[ 2 ]
         :nEditType     := EDIT_GET
         :nFooterType   := AGGR_SUM
         :nFootStrAlign := AL_RIGHT
      END
      oBrwC:MakeTotals()
ACTIVATE DIALOG oDlgVr CENTERED on INIT ( oBar:Move( 25, 15, 100 ) )
 
this link help me
http://forums.fivetechsupport.com/viewt ... ar#p228006

Re: control exceeds size in run time

Posted: Thu Mar 04, 2021 9:29 am
by richard-service
artu01 wrote:I resolved of this way:

source code

Code: Select all

REDEFINE BUTTONBAR oBar ID 100 OF oFld:aDialogs[3] 2007 TRANSPARENT    

   DEFINE BUTTON OF oBar PROMPT "Add"     FILE "c:\1712\fwh\bitmaps\32x32\new.bmp" ACTION ( IIF(cCodpag='02', AddRow(oBrwC), MsgAlert("Condicion de pago no es a Credito")), oBrwC:SetFocus() )  
   DEFINE BUTTON OF oBar PROMPT "Delete"  FILE "c:\1712\fwh\bitmaps\delete.bmp" ACTION ( IIF(cCodpag='02', DeleteRow(oBrwC), MsgAlert("Condicion de pago no es a Credito")), oBrwC:SetFocus() )


    REDEFINE XBROWSE oBrwC                  ;
      COLUMNS 1, 2                          ;
      HEADERS "Fecha","Importe"             ;
      COLSIZES 70, 100                      ;
      ARRAY {} LINES FASTEDIT CELL FOOTERS  ;
     ID 4018 OF oFld:aDialogs[3]            ;                                    
     UPDATE

      oBrwC:aCols[ 1 ]:nEditType     := EDIT_GET

      WITH OBJECT oBrwC:aCols[ 2 ]
         :nEditType     := EDIT_GET
         :nFooterType   := AGGR_SUM
         :nFootStrAlign := AL_RIGHT
      END
      oBrwC:MakeTotals()
ACTIVATE DIALOG oDlgVr CENTERED on INIT ( oBar:Move( 25, 15, 100 ) )
 
this link help me
http://forums.fivetechsupport.com/viewt ... ar#p228006
Thanks for your share solution