ButtonBar in a specific location ( Solved )

ButtonBar in a specific location ( Solved )

Postby ctoas » Mon Mar 30, 2020 2:28 pm

Friends...

How to create a ButtonBar in a specific location in the Window?

The wiki shows:
  @ <nRow>, <nCol> BUTTONBAR [<oBar>];
  [SIZE <nWidth>, <nHeight>];
  [BUTTONSIZE <nBtnWidth>, <nBtnHeight>];
  [3D | 3DLOOK | _3D | _3DLOOK];
  [TOP | LEFT | RIGHT | BOTTOM | FLOAT];
  [OF | WINDOW | DIALOG <oWnd>];
  [CURSOR <oCursor>]

But give the following error in the compilation:
Error E0022 Invalid lvalue: 'Numeric'

Can anyone help?

Thanks!
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
User avatar
ctoas
 
Posts: 115
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil

Re: ButtonBar in a specific location

Postby cnavarro » Mon Mar 30, 2020 2:56 pm

Please put little sample for tests
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ButtonBar in a specific location

Postby ctoas » Mon Mar 30, 2020 3:07 pm

Thanks for responding C. Navarro

I need to place the ButtonBar below the Title:
Code: Select all  Expand view  RUN

    DEFINE WINDOW oWndAGENDA FROM 0,0 TO 600,1041 PIXEL TITLE "GAM - AGENDA DE CONTATOS" COLORS nRGB(215,243,366),nRGB(215,215,215) NO MAXIMIZE
   
        @ 0000,0000 TITLE oTitle OF oWndAGENDA SIZE 1025,0059 NOBORDER PIXEL
        oTitle:aGrdBack := {{1,nRGB(150,150,150),nRGB(150,150,150)}}
        oTitle:nShadow  := 0
       
        @ 0010,0020 TITLEIMG OF oTitle BITMAP "TIT_AGENDA" SIZE 0052,0052        
                                                                             
        @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefônica" COLOR nRGB(255,255,255) FONT ARIAL14B
        @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATOS"          COLOR nRGB(000,000,000) FONT ARIAL16B         
       
       
        DEFINE BUTTONBAR oBarAGENDA 3DLOOK OF oWndAGENDA 2015 SIZE 0078,0078
       
        DEFINE BUTTON oBtnADICIONAR  RESOURCE "BAR_DLG_ADICIONAR"  OF oBarAGENDA PROMPT "Adicionar"        FONT ARIAL14B
        DEFINE BUTTON oBtnVISUALIZAR RESOURCE "BAR_DLG_VISUALIZAR" OF oBarAGENDA PROMPT "Visualizar"       FONT ARIAL14B
        DEFINE BUTTON oBtnALTERAR    RESOURCE "BAR_DLG_EDITAR"     OF oBarAGENDA PROMPT "Editar"           FONT ARIAL14B
        DEFINE BUTTON oBtnEXCLUIR    RESOURCE "BAR_DLG_EXCLUIR"    OF oBarAGENDA PROMPT "Excluir"          FONT ARIAL14B
        DEFINE BUTTON oBtnRELATORIOS RESOURCE "BAR_DLG_RELATORIOS" OF oBarAGENDA PROMPT "Relatórios" GROUP FONT ARIAL14B   
        DEFINE BUTTON oBtnSAIR       RESOURCE "BAR_DLG_SAIR"       OF oBarAGENDA PROMPT "Sair"       GROUP FONT ARIAL14B
       
        oBarAGENDA:nTOP = 200                                                                                                                                  
   
    ACTIVATE WINDOW oWndAGENDA CENTERED
 


I use it exactly in Dialogs, considering Dialog in ON INIT and it works perfectly.
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
User avatar
ctoas
 
Posts: 115
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil

Re: ButtonBar in a specific location

Postby cnavarro » Mon Mar 30, 2020 3:39 pm

Christiano, try with this, and tell me ( my name is Cristobal )

Code: Select all  Expand view  RUN

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

#include "Fivewin.ch"
#include "ttitle.ch"

Function Main

   local oTitle
   local oBarAgenda
   local oWndAgenda
   local oBtnADICIONAR  
   local oBtnVISUALIZAR
   local oBtnALTERAR    
   local oBtnEXCLUIR    
   local oBtnRELATORIOS
   local oBtnSAIR      

    DEFINE WINDOW oWndAGENDA FROM 0,0 TO 600,1041 PIXEL TITLE "GAM - AGENDA DE CONTATOS" COLORS nRGB(215,243,366),nRGB(215,215,215) NO MAXIMIZE
   
        @ 0000,0000 TITLE oTitle OF oWndAGENDA SIZE 1025,0059 NOBORDER //PIXEL
        oTitle:aGrdBack := {{1,nRGB(150,150,150),nRGB(150,150,150)}}
        oTitle:nShadow  := 0
       
        @ 0010,0020 TITLEIMG OF oTitle BITMAP "TIT_AGENDA" SIZE 0052,0052        
                                                                             
        @ 0015,0120 TITLETEXT OF oTitle TEXT "Agenda Telefônica" COLOR nRGB(255,255,255)
        @ 0040,0120 TITLETEXT OF oTitle TEXT "CONTATOS"          COLOR nRGB(000,000,000)
       
       
        @ 60, 0 BUTTONBAR oBarAGENDA 3DLOOK OF oWndAGENDA TOP SIZE 0740, 0078
        oBarAgenda:bRClicked  := { || nil }
        oBarAgenda:l2015      := .T.
        oBarAgenda:nBtnWidth  := 120
        oBarAgenda:nBtnHeight := 78

        DEFINE BUTTON oBtnADICIONAR   OF oBarAGENDA PROMPT "Adicionar"      
        DEFINE BUTTON oBtnVISUALIZAR  OF oBarAGENDA PROMPT "Visualizar"      
        DEFINE BUTTON oBtnALTERAR     OF oBarAGENDA PROMPT "Editar"          
        DEFINE BUTTON oBtnEXCLUIR     OF oBarAGENDA PROMPT "Excluir"        
        DEFINE BUTTON oBtnRELATORIOS  OF oBarAGENDA PROMPT "Relatórios" GROUP  
        DEFINE BUTTON oBtnSAIR        OF oBarAGENDA PROMPT "Sair"       GROUP ACTION oWndAgenda:End()
       
    ACTIVATE WINDOW oWndAGENDA CENTERED
 
Return nil

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

 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ButtonBar in a specific location

Postby ctoas » Mon Mar 30, 2020 3:48 pm

It worked!

Thank you very much
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
User avatar
ctoas
 
Posts: 115
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests