Choosefont no funciona bien ? (fixed)

Choosefont no funciona bien ? (fixed)

Postby Gabri » 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.
Gabri
 
Posts: 14
Joined: Mon Oct 10, 2005 12:28 pm

Postby Antonio Linares » Fri Oct 28, 2005 6: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?):

Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Choosefont no funciona bien ?

Postby Antonio Linares » Fri Oct 28, 2005 6: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:

Code: Select all  Expand view
   
::lBold = If( lFromUser, ! ( ::nWeight == FW_NORMAL ), lBold )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 4 guests