FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Pregunta sobre Rbbtn
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Pregunta sobre Rbbtn
Posted: Mon Sep 17, 2012 11:24 PM

Tengo definido un dialogo con un gradiente y defin铆 unos botones Rbbtn tambi茅n con gradientes, pero los botones no toman el gradiente. Si le quito la clausula gradiente al Dialogo si toma el gradiente de los mismos. Es correcto este comportamiento ?, es posible modificarlo ? Muchas gracias

Saludos

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Pregunta sobre Rbbtn
Posted: Tue Sep 18, 2012 07:47 AM

Horacio,

Puedes mostrar el c贸digo de c贸mo lo haces 贸 proporcionar un ejemplo peque帽o ? gracias

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Pregunta sobre Rbbtn
Posted: Tue Sep 18, 2012 01:46 PM
Antonio, aqu铆 te mando el c贸digo.

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "ribbon.ch" 聽 
Function Main()聽
聽 聽 
聽 聽Local oDlg
聽 聽Local oBtn := Array( 2, 0 )
聽 聽 聽 聽 
聽 聽 Define Dialog oDlg Resource 'Folders' Gradient { { 0.5, nRGB( 232, 232, 232 ), nRGB( 240, 240, 240 ) }, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{ 0.5, nRGB( 240, 240, 聽240 ), nRGB( 232, 232, 232 ) } } 

聽 聽 聽 Redefine Rbbtn oBtn[ 1 ] Prompt "Cerrar" 聽Id 251 Bitmap 'imagen98' 聽Action( msgalert( 'click' ) ) Left; 
聽 聽 聽 Gradiant { { 0.5, Rgb( 125,250,255 ), Rgb( 147,250,255 ) }, { 0.5, CLR_CYAN, CLR_HCYAN } }
聽 聽 聽 Redefine Rbbtn oBtn[ 2 ] Prompt "Guardar" Id 250 Bitmap 'grabar' Action ( msgalert( 'click' ) ) Left;
聽 聽 聽 Gradiant { { 0.5, Rgb( 125,250,255 ), Rgb( 147,250,255 ) }, { 0.5, CLR_CYAN, CLR_HCYAN } }


聽 聽Activate Dialog oDlg 
聽 聽 Return 0


Aqui el RC
Code (fw): Select all Collapse
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.00".

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

FOLDERS DIALOG DISCARDABLE 98, 31, 378, 236
STYLE DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_CLIPSIBLINGS|WS_VISIBLE
FONT 8, "MS Sans Serif"
{
聽 CONTROL "Test", 251, "TRBTN", 0x00000000, 321, 208, 53, 20
聽 CONTROL "Test", 250, "TRBTN", 0x00000000, 321, 187, 53, 20
}


Saludos
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Pregunta sobre Rbbtn
Posted: Tue Sep 18, 2012 06:48 PM
Horacio,

Como soluci贸n r谩pida cambia el c贸digo asi:

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "ribbon.ch" 聽 
Function Main() 
聽 聽 
聽 聽Local oDlg
聽 聽Local oBtn := Array( 2, 0 )
聽 聽 聽 聽 
聽 聽 Define Dialog oDlg Resource 'Folders

聽 聽 聽 Redefine Rbbtn oBtn[ 1 ] Prompt "Cerrar" 聽Id 251 Bitmap 'imagen98' 聽Action( msgalert( 'click' ) ) Left; 
聽 聽 聽 Gradiant { { 0.5, Rgb( 125,250,255 ), Rgb( 147,250,255 ) }, { 0.5, CLR_CYAN, CLR_HCYAN } }
聽 聽 聽 Redefine Rbbtn oBtn[ 2 ] Prompt "Guardar" Id 250 Bitmap 'grabar' Action ( msgalert( 'click' ) ) Left;
聽 聽 聽 Gradiant { { 0.5, Rgb( 125,250,255 ), Rgb( 147,250,255 ) }, { 0.5, CLR_CYAN, CLR_HCYAN } }

聽 聽oDlg:aGradColors = { { 0.5, nRGB( 232, 232, 232 ), nRGB( 240, 240, 240 ) }, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { 0.5, nRGB( 240, 240, 聽240 ), nRGB( 232, 232, 232 ) } }

聽 聽Activate Dialog oDlg 
聽
Return 0
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Pregunta sobre Rbbtn
Posted: Tue Sep 18, 2012 07:21 PM

Gracias Antonio, funcion贸 perfecto ...

Saludos

Continue the discussion