FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Bugs report & fixes / Informe de errores y arreglos Choosefont no funciona bien ? (fixed)
Posts: 14
Joined: Mon Oct 10, 2005 12:28 PM
Choosefont no funciona bien ? (fixed)
Posted: Tue Oct 11, 2005 11:22 PM

Hola

Estoy utilizando la funcion Choosefont(), cuando selecciono un tipo de letra y la pongo en negrita, en el array que me devuelve no me lo devuelve con un tipo de letra en negrita, es que funciona mal esta funcion ?

aFont:=Choosefont() > AFont[8] siempre me devuelve .f.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Choosefont no funciona bien ? (fixed)
Posted: Fri Oct 28, 2005 06:29 AM
Gabri,

Acabo de probar este ejemplo, y funciona correctamente. Pulsa el botón, selecciona negrita y verás como el botón se ve en negrita y muestra .t.. Y si luego le quitas negrita, sucede lo contrario. (Que version y build estás usando?):

#include "FiveWin.ch"

static oWnd

function Main()

   local oBtn

   DEFINE WINDOW oWnd TITLE "Testing ChooseFont"

   @ 2, 2 BUTTON oBtn PROMPT "&Choose" OF oWnd ;
      ACTION ( oBtn:GetFont(),;
               oBtn:SelFont(), MsgInfo( oBtn:oFont:lBold ) ) ;  // nSize()
      SIZE 80, 25

   ACTIVATE WINDOW oWnd

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Choosefont no funciona bien ?
Posted: Fri Oct 28, 2005 06:45 AM
Gabri wrote:aFont:=Choosefont() > AFont[8] siempre me devuelve .f.


El valor negrita no se almacena en la posición 8. Se toma a partir del valor 5:

   
::lBold = If( lFromUser, ! ( ::nWeight == FW_NORMAL ), lBold )
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion