Cambiar font a un @x,y browse

Cambiar font a un @x,y browse

Postby jgayoso » Tue Jun 05, 2012 7:53 pm

¿Como puedo cambiarle el font a un @x,y browse?

@19.5,0.1 BROWSE oBrw_Vta OF oWnd_Ventas ;
HEADERS hb_strtoutf8(TXTp00_010), hb_strtoutf8(TXTp00_011), hb_strtoutf8(TXTp00_012), hb_strtoutf8(TXTp00_013), " ", hb_strtoutf8(TXTp00_014) ;
COLSIZES 125,332,86,95,45,90 ;
FIELDS vbpantx[ oBrw_Vta:nAt ][ 1 ],;
vbpantx[ oBrw_Vta:nAt ][ 2 ],;
iif(vbpantx[ oBrw_Vta:nAt ][ 3 ]=0,' ',transform(vbpantx[ oBrw_Vta:nAt ][ 3 ],picant)),;
iif(vbpantx[ oBrw_Vta:nAt ][ 3 ]=0,' ',transform(vbpantx[ oBrw_Vta:nAt ][ 4 ],picst)),;
If(valtype(vbpantx[ oBrw_Vta:nAt ][ 6 ])='C' .and. vbpantx[ oBrw_Vta:nAt ][ 6 ]='P','ABF',space(6)),;
iif(vbpantx[ oBrw_Vta:nAt ][ 3 ]=0,' ',transform(vbpantx[ oBrw_Vta:nAt ][ 5 ]- vbpantx[ oBrw_Vta:nAt ][ 10 ],picst));
SIZE 776,400

oBrw_Vta:SetArray( vbpantx )
oBrw_Vta:nRowPos = 2
oBrw_Vta:nAt = 2

Desde ya se agradece.
jgayoso
 
Posts: 170
Joined: Sat Aug 07, 2010 11:36 pm
Location: Chile

Re: Cambiar font a un @x,y browse

Postby jgayoso » Tue Jun 05, 2012 9:18 pm

Me auto respondo:

fCambia_Font(oBrw_Vta:hWnd, 1)

#IfDef __FIVELINUX__

#pragma BEGINDUMP

#include <gtk/gtk.h>
#include "hbapi.h"

HB_FUNC( FCAMBIA_FONT )
{
PangoFontDescription *fontDesc;
if (hb_parnl(2) == 1) {
fontDesc = pango_font_description_from_string( "courier italic 10" );
} else if (hb_parnl(2) == 2) {
fontDesc = pango_font_description_from_string( "courier bold italic 10" );
} else {
fontDesc = pango_font_description_from_string( "courier bold 10" );
};
gtk_widget_modify_font((GtkWidget *) hb_parnl( 1 ), fontDesc);
}

#pragma ENDDUMP
#Endif
jgayoso
 
Posts: 170
Joined: Sat Aug 07, 2010 11:36 pm
Location: Chile


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 8 guests