Hola Amigos,
Usualmente, luego de definir una barra de botones (BUTTONBAR) en la ventana principal, luego defino los botones (BUTTON), y éstos empiezan por la izquierda hacia la derecha.
Ahora, como haría para tener un BUTTON al lado derecho la barra de botónes ?
Gracias
Button a la derecha
- Willi Quintana
- Posts: 859
- Joined: Sun Oct 09, 2005 10:41 pm
- Location: Cusco - Perú
- Contact:
Re: Button a la derecha
João Santos - São Paulo - Brasil
Re: Button a la derecha
Code: Select all
// C:\FWH..\SAMPLES\TESTBTNL.PRG
#include "Fivewin.ch"
PROCEDURE MAIN()
Local oFont, oWnd, oBar, b1, b2, b3, b4, b5
DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0,-10
DEFINE WINDOW oWnd FROM 0,0 TO 474,639 PIXEL TITLE "Test"
oWnd:SetFont(oFont)
DEFINE BUTTONBAR oBar TOP _3D SIZE 80,80 OF oWnd
DEFINE BUTTON RESOURCE "TOP" TOP PROMPT "Top" NOBORDER OF oBar
DEFINE BUTTON RESOURCE "LEFT" LEFT PROMPT "Left" NOBORDER OF oBar
DEFINE BUTTON RESOURCE "BOTTOM" BOTTOM PROMPT "Bottom" NOBORDER OF oBar
DEFINE BUTTON RESOURCE "RIGHT" RIGHT PROMPT "Right" NOBORDER OF oBar
DEFINE BUTTON RESOURCE "CENTER" CENTER PROMPT "Center" NOBORDER OF oBar
@10,500 BTNBMP RESOURCE "TOP" TOP PROMPT "DERECHA" SIZE 70,70 OF oBar
// @100,100 BTNBMP RESOURCE "TOP" TOP PROMPT "Top" SIZE 80,80 OF oWnd
/*
@180, 20 BTNBMP RESOURCE "LEFT" LEFT PROMPT "Left" SIZE 80,80 OF oWnd
@260,100 BTNBMP RESOURCE "BOTTOM" BOTTOM PROMPT "Bottom" SIZE 80,80 OF oWnd
@180,180 BTNBMP RESOURCE "RIGHT" RIGHT PROMPT "Right" SIZE 80,80 OF oWnd
@180,100 BTNBMP RESOURCE "CENTER" CENTER PROMPT "Center" SIZE 80,80 OF oWnd
@100,400 BTNBMP b1 RESOURCE "TOP","","TOP0" TOP PROMPT "Top" SIZE 80,80 OF oWnd
@180,320 BTNBMP b2 RESOURCE "LEFT","","LEFT0" LEFT PROMPT "Left" SIZE 80,80 OF oWnd
@260,400 BTNBMP b3 RESOURCE "BOTTOM","","BOTTOM0" BOTTOM PROMPT "Bottom" SIZE 80,80 OF oWnd
@180,480 BTNBMP b4 RESOURCE "RIGHT","","RIGHT0" RIGHT PROMPT "Right" SIZE 80,80 OF oWnd
@180,400 BTNBMP b5 RESOURCE "CENTER","","CENTER0" CENTER PROMPT "Center" SIZE 80,80 OF oWnd
b1:Disable()
b2:Disable()
b3:Disable()
b4:Disable()
b5:Disable()
*/
DEFINE MSGBAR OF oWnd PROMPT "Testing bitmaped buttons with captions" ;
TIME DATE NOINSET
ACTIVATE WINDOW oWnd
RETURN
procedure AppSys // Xbase++ requirement
return
Saludos.
João Santos - São Paulo - Brasil
Re: Button a la derecha
Saludos ;
Añadir la clausula BTNRIGHT y el botón se te pone como en la imagen.
Ejemplo.:
Añadir la clausula BTNRIGHT y el botón se te pone como en la imagen.
Ejemplo.:
Code: Select all
DEFINE BUTTON oBtns6 OF oBarMain PROMPT "Salir" ;
FILE ".\imagenes\png\boton.png" BTNRIGHT FLAT
oBtns6:bAction := { || oWndMain:End() }
oBtns6:oCursor := oCursorHand
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
Venezuela
m a g 0 7 1 @ g m a i l. c o m
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Button a la derecha
Willi
I just create 'blank' buttons to add fill to my button bar .. Consider this code..
Rick Lipkin
I just create 'blank' buttons to add fill to my button bar .. Consider this code..
Rick Lipkin
Code: Select all
DEFINE BUTTONBAR oBar OF oWind SIZE 80,64 2010
oBar:SetColor( 0) // 45,40
oBar:bClrGrad = { || { { 0.10,15724527,7303023 }, ; // grey
{ 0.10,7303023,15724527 } } }
DEFINE BUTTON oButt1 of oBar ACTION ( _CustOpen( "A",oWind )) ;
RESOURCE "customer" PROMPT "Clients-Billing" TOOLTIP "Clients and Billing"
DEFINE BUTTON oButt2 of oBar ACTION (_Arview( "A",oWind )) ;
RESOURCE "payment" PROMPT "Receivables" TOOLTIP "Review Receivables"+CRLF+"Customer Statements"
// review //
DEFINE BUTTON oButt3 of oBar ACTION ( _PayView( "A",oWind )) ;
RESOURCE "cash" PROMPT "Payments" TOOLTIP "Payments and Adjustments"
* DEFINE BUTTON oButt4 of oBar ACTION nil
* DEFINE BUTTON oButt5 of oBar ACTION nil
DEFINE BUTTON oButt7 of oBar ACTION ( nil ) // hide this ;
DEFINE BUTTON oButt8 of oBar ACTION ( nil ) // hide this
//-------- group --
MENU oPopRpt POPUP
MENUITEM "Customer Reports" //RESOURCE "billing" ;
MENU
MENUITEM "Customer Listing Report" ACTION ( _CustList() )
MENUITEM "Customer History Report" ACTION ( _CustHist() )
MENUITEM "Customer Advertising and Publishing Report" ACTION ( _PubRpt() )
ENDMENU
MENUITEM "Accounts Receivable Reports" //FileName (cDefa+"\Icons\FOLDERCLOSED.bmp");
MENU
MENUITEM "Customer Balance and Ageing Report" ACTION ( _ArAgeing())
ENDMENU
MENUITEM "Payment Reports" // FileName (cDefa+"\Icons\FOLDERDETAIL.bmp");
MENU
MENUITEM "Payments and Adjustments Report" ACTION ( _PaymtRpt() )
MENUITEM "Customer Pre-Payment Balances " ACTION ( _PrePay() )
ENDMENU
ENDMENU
DEFINE BUTTON oButt9 of oBar RESOURCE "report" ;
MESSAGE "Reports" ;
ACTION oButt9:ShowPopup();
PROMPT "Reports" GROUP ;
MENU oPopRpt
oButt9:cToolTip := { " " + CRLF + "Reports", "Customer, Acct Rec and Payment Reports", 1, CLR_BLACK, 14089979 }
............
............
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Button a la derecha
BTNRIGHT clause is provided to display the button on the rightside of the bar.mag071 wrote:Saludos ;
Añadir la clausula BTNRIGHT y el botón se te pone como en la imagen.
Ejemplo.:Code: Select all
DEFINE BUTTON oBtns6 OF oBarMain PROMPT "Salir" ; FILE ".\imagenes\png\boton.png" BTNRIGHT FLAT oBtns6:bAction := { || oWndMain:End() } oBtns6:oCursor := oCursorHand
FWH recommends use of BTNRIGHT clause.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Willi Quintana
- Posts: 859
- Joined: Sun Oct 09, 2005 10:41 pm
- Location: Cusco - Perú
- Contact:
Re: Button a la derecha
Gracias nageswaragunupudi, la cláusula BTNRIGHT FLAT funcionó perfectamente
Re: Button a la derecha
aca va otra.
DEFINE BUTTON oBtns[12] OF oBar RESOURCE "BAR_AYU" ;
TOOLTIP "Ayuda," + CRLF + "Indice y Contenido";
NOBORDER
oVentPrinc:bResized:={|| oBtns[12]:Move(2,oVentPrinc:nWidth()-35)}
Saludos
DEFINE BUTTON oBtns[12] OF oBar RESOURCE "BAR_AYU" ;
TOOLTIP "Ayuda," + CRLF + "Indice y Contenido";
NOBORDER
oVentPrinc:bResized:={|| oBtns[12]:Move(2,oVentPrinc:nWidth()-35)}
Saludos