control exceeds size in run time RESOLVED

control exceeds size in run time RESOLVED

Postby artu01 » Mon Feb 15, 2021 12:49 am

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  Expand view

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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: control exceeds size in run time

Postby nageswaragunupudi » Mon Feb 15, 2021 6:33 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: control exceeds size in run time

Postby richard-service » Mon Feb 15, 2021 10:10 am

Hi
I use this code.

Code: Select all  Expand view

LOCAL oRect := ::oDlg:GetCliRect()

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

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: control exceeds size in run time

Postby artu01 » Fri Feb 19, 2021 11:54 pm

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

Re: control exceeds size in run time

Postby artu01 » Wed Mar 03, 2021 3:48 pm

I resolved of this way:

source code
Code: Select all  Expand view

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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: control exceeds size in run time

Postby richard-service » Thu Mar 04, 2021 9:29 am

artu01 wrote:I resolved of this way:

source code
Code: Select all  Expand view

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
viewtopic.php?f=3&t=38173&p=228006&hilit=redefine+buttonbar#p228006


Thanks for your share solution
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 76 guests