FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oget:bchange
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
oget:bchange
Posted: Wed Jan 14, 2015 10:32 AM
how I can change a get on line when it is changed by user or update from a function called ?

I have this get

@ nrow, ncol get ax1 pict "9" PIXEL SIZE SIZEX,SIZEY OF oDlg NOBORDER CENTER ;
VALID ax1 $ " 123456789" .and. Verifica_tutto(ax1,1,1,1) COLOR CLR_BLACK, CLR_HGRAY ;
FONT oFontNumeri

I wish change into CLR_WHITE,CLR_GREEN


I made a test but it not run why ?

Code (fw): Select all Collapse
#include"fivewin.ch"

function test()
Local oDlg,ax1
define dialog odlg

@ 10,10 get ax1 size 100,10 of odlg COLOR CLR_BLACK,CLR_RED  UPDATE


activate dialog odlg;
on init testcolor(ax1:oGet)
return nil

Function testcolor(ocontrol)
   ocontrol:setcolor(CLR_WHITE,CLR_GREEN)

return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: oget:bchange
Posted: Wed Jan 14, 2015 01:21 PM

Try adding:

oControl:refresh()

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: oget:bchange
Posted: Wed Jan 14, 2015 01:41 PM
Code (fw): Select all Collapse
#include"fivewin.ch"

function test()
Local oDlg,oGet,ax1 := SPACE( 30 )
define dialog odlg

@ 1,1 get oGet VAR ax1 size 100,10 of odlg COLOR CLR_BLACK,CLR_RED  UPDATE


activate dialog odlg;
on init testcolor(oGet)
return nil

Function testcolor(ocontrol)
   ocontrol:setcolor(CLR_WHITE,CLR_GREEN)

return nil


EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: oget:bchange
Posted: Wed Jan 14, 2015 05:35 PM

SORRY
i HAVE ONLY

@ nrow, ncol get ax1 pict "9" PIXEL SIZE SIZEX,SIZEY OF oDlg NOBORDER CENTER ;
VALID ax1 $ " 123456789" .and. Verifica_tutto(ax1,1,1,1) COLOR CLR_BLACK,nColorBlocco1 ;
FONT oFontNumeri

If now I change all and inser oGet[1] var ax1 run the get but then the other function not run ok

I am recompiling an old clipper app with fwh

how I can Know the obj of the get have ax1 ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: oget:bchange
Posted: Thu Jan 15, 2015 09:59 AM

Silvio,

maybe changing colors, working with CLASSNAMES ?

viewtopic.php?f=3t=29979

best regards
Uwe :?:

&

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: oget:bchange
Posted: Fri Jan 16, 2015 12:38 PM

Uwe,

I have 81 gets and now i put

x,y GET aGet[1] var ax1

If I Know the var ax1 can call aget[1] and colorize it ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: oget:bchange
Posted: Fri Jan 16, 2015 12:57 PM

Look
C:\Fwh\Fwh1412\samples\readvar,prg

Not if you serve for what you need

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: oget:bchange
Posted: Fri Jan 16, 2015 03:20 PM
If I Know the var ax1 can call aget[1] and colorize it ?


That depends.

If all the GETs are readonly then use the dialog's ON INIT clause.

If you want to change the color after data is entered into a GET, then use the VALID clause.

If you want to change the color while the user is entering data, then use the bChange codeblock.

Really, IMHO, 81 Gets is not a good IU design--it is too complex. Consider breaking this into at least two dialogs. Even 40 Gets is a lot to comprehend and handle all at once.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion