Cambiar el picture de un get en teimpo de ejecución

Cambiar el picture de un get en teimpo de ejecución

Postby nicinf » Sun Mar 14, 2021 6:36 pm

Hola.
Me gustaría cambiar en tiempo de ejecución un Get (oSeek) que tiene un picture de texto "@!" a uno de fecha "99/99/9999". Lo he probado con oSeek:cPicture := "99/99/9999" y aunque no me dá ningún tipo de error, no me modifica el picture. Dá lo mismo que lo refresque o actualize (oSeek:Refresh(), oSeek:Update().
Alguna idea de por qué no dá error pero no hace nada y sigue admitiendo texto y no formato fecha???
Muchas gracias.
nicinf
 
Posts: 11
Joined: Thu Oct 25, 2018 7:26 am

Re: Cambiar el picture de un get en teimpo de ejecución

Postby Enrico Maria Giordano » Sun Mar 14, 2021 6:42 pm

This is a working sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oGet

    LOCAL cVar1 := ""
    LOCAL xVar2 := SPACE( 35 )

    LOCAL cPic

    DEFINE DIALOG oDlg

    @ 1, 1 COMBOBOX cVar1;
           ITEMS { "C", "N" };
           ON CHANGE ( IF( cVar1 = "C", ( xVar2 := SPACE( 35 ), cPic := REPLICATE( "X", 35 ) ), ),;
                       IF( cVar1 = "N", ( xVar2 := 0, cPic := "9999" ), ),;
                       oGet:cPicture := cPic,;
                       oGet:Refresh() )

    @ 3, 1 GET oGet VAR xVar2

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8398
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Cambiar el picture de un get en teimpo de ejecución

Postby carlos vargas » Mon Mar 15, 2021 8:40 pm


April 2020
==========
* XIMAGE
- New DATA lMnuSave, allow hide menu options for save image
- Implemented styles 2007, 2010, 2013, 2015 for menu popup
- Added traduction Popup menu

* New: FUll support to easily build your PRGs from Microsoft free vscode. Just open
a PRG from FWH\samples and build it using Ctrl + Shift + B

* New: samples/photos.prg lets you take photos using the webcam. Thanks to many that
have contributed to it:

http://forums.fivetechsupport.com/viewt ... 79&start=0

* GET:
- New method Reset( uVal/bNewSetGet, [cPic] ) --> nil
Allows to reset the get with a new variable of a different data type
and optionally use a new picture.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1704
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests