Nuevo build de FWPPC con Tabs

Nuevo build de FWPPC con Tabs

Postby Antonio Linares » Thu Mar 09, 2006 10:15 am

regards, saludos

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

Postby astursoft » Fri Mar 10, 2006 8:25 am

Admite el estilo TCS_BUTTONS ?
si es asi como ?
intento :
Code: Select all  Expand view


#define TCS_BUTTONS  256

@ 2, 2 TABCONTROL oTabs PROMPTS { "One", "Two", "Three" } ;
      OPTION 2 ACTION { || MsgInfo( oTabs:nOption ) } ;
      SIZE 205, 80 OF oWnd
   
    oTabs:nStyle := nOR( WS_CHILD, WS_VISIBLE, TCS_BUTTONS ,TCS_VERTICAL , WS_TABSTOP )


pero no logro que me funciona.
Gracias
Jose Luis Parajón
Asturias
User avatar
astursoft
 
Posts: 139
Joined: Sun Nov 06, 2005 6:14 pm
Location: Asturias

Postby Antonio Linares » Fri Mar 10, 2006 9:00 am

Jose Luis,

Tendrías que hacerlo así:
Code: Select all  Expand view
#define GWL_STYLE        (-16)

   SetWindowLong( oTabs:hWnd, GWL_STYLE,;
                  nOr( GetWindowLong( oTabs:hWnd, GWL_STYLE ), WS_CHILD, WS_VISIBLE, TCS_BUTTONS ,TCS_VERTICAL , WS_TABSTOP ) )
regards, saludos

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

Postby astursoft » Fri Mar 10, 2006 9:59 am

Antonio, el estilo del tab cambia , pero ahora no funcionan los botones , le das a los botones 1 o 3 y no cambia de tab .
Saludos y gracias.
Jose Luis Parajón
Asturias
User avatar
astursoft
 
Posts: 139
Joined: Sun Nov 06, 2005 6:14 pm
Location: Asturias

Postby Antonio Linares » Sun Mar 12, 2006 7:33 am

Jose Luis,

Funciona, lo que ocurre es que si se muestra un mensaje, entonces no se completa la secuencia de cambio de opción. Este ejemplo funciona, pero te muestra la opción anterior, no la nueva, por la misma razón.
Code: Select all  Expand view
#include "FWCE.ch"

function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "TabControl"
   
   @ 2, 2 TABCONTROL oTabs PROMPTS { "One", "Two", "Three" } ;
      OPTION 2 ACTION oWnd:Say( 10, 4, oTabs:nOption ) ;
      SIZE 205, 80 OF oWnd

   #define GWL_STYLE        (-16)
   #define TCS_BUTTONS     0x0100

   SetWindowLong( oTabs:hWnd, GWL_STYLE,;
                  nOr( GetWindowLong( oTabs:hWnd, GWL_STYLE ), TCS_BUTTONS ) )
   
   ACTIVATE WINDOW oWnd ;
      ON CLICK MsgInfo( "Click!" )
   
return nil

La solución es modificar la clase para que se autoenvie un mensaje con PostMessage().
regards, saludos

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

Postby Antonio Linares » Sun Mar 12, 2006 7:40 am

Jose Luis,

Solucionado :) y publicado un nuevo build.
regards, saludos

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


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 3 guests