control exceeds size in run time RESOLVED

Post Reply
artu01
Posts: 306
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

control exceeds size in run time RESOLVED

Post 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
Last edited by artu01 on Wed Mar 03, 2021 3:48 pm, edited 1 time in total.
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: control exceeds size in run time

Post by nageswaragunupudi »

Buttonbar always extends to the full width of the window/dialog.
Regards

G. N. Rao.
Hyderabad, India
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: control exceeds size in run time

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

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
artu01
Posts: 306
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: control exceeds size in run time

Post by artu01 »

thank you Mr. Rao y Richard-Service for his reponse
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
artu01
Posts: 306
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: control exceeds size in run time

Post 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
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: control exceeds size in run time

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

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
Post Reply