ButtonBar in a specific location ( Solved )

Post Reply
User avatar
ctoas
Posts: 103
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil
Contact:

ButtonBar in a specific location ( Solved )

Post by ctoas »

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
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ButtonBar in a specific location

Post by cnavarro »

Please put little sample for tests
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
ctoas
Posts: 103
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil
Contact:

Re: ButtonBar in a specific location

Post by ctoas »

Thanks for responding C. Navarro

I need to place the ButtonBar below the Title:

Code: Select all

    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
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ButtonBar in a specific location

Post by cnavarro »

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

Code: Select all

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

#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

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

 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
ctoas
Posts: 103
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil
Contact:

Re: ButtonBar in a specific location

Post by ctoas »

It worked!

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

MaxxTech Soluções em TI
http://www.maxxtech.com.br
Post Reply