FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour resize a get field on GotFocus
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
resize a get field on GotFocus
Posted: Sun May 01, 2016 05:37 PM

Hello,
How can I resize a get field on GotFocus?
I want to change font on GotFocus – this is working.
But with the bigger font I would need a larger get field.
I tried with: oGetKonto7:Resize( 0, 200, 50 )
But this does not work.
Best regards,
Otto
oGetKonto7:bGotFocus = { || oGetKonto7:Resize( 0, 200, 50 ), oGetKonto7:SetFont(Setup():oFntMetroFLATBTN ) ,oGetKonto7:nClrText( CLR_BLACK ),oGetKonto7:paint() }

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: resize a get field on GotFocus
Posted: Sun May 01, 2016 05:53 PM
Otto,

oGetKonto7:bGotFocus = { || oGetKonto7:Resize( 0, 200, 50 ), ;
oGetKonto7:SetFont(Setup():oFntMetroFLATBTN ) ,;
oGetKonto7:nClrText( CLR_BLACK ),oGetKonto7:paint() }


oGetKonto7:bGotFocus = { || oGetKonto7:nWidth := 200, oGetKonto7:nHeight := 50, ;
oGetKonto7:SetFont(Setup():oFntMetroFLATBTN ) ,;
oGetKonto7:nClrText( CLR_BLACK ), oGetKonto7:Refresh() }

or
oGetKonto7:Setcolor( CLR_BLACK, ),

sample from RESOURCE



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: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: resize a get field on GotFocus
Posted: Sun May 01, 2016 11:46 PM

Hallo Uwe,
vielen Dank. Funktioniert super.
Danke und liebe Grüße
Otto

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: resize a get field on GotFocus
Posted: Mon May 02, 2016 10:55 AM
Otto wrote:I tried with: oGetKonto7:Resize( 0, 200, 50 )
But this does not work.


Code (fw): Select all Collapse
oGetKonto7:SetSize( 200, 50 )


EMG
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: resize a get field on GotFocus
Posted: Mon May 02, 2016 01:33 PM

Hello Enrico,
Using resize for lostFocus does not clear the background.
2nd codeblock is working.
oGetKonto5:nWidth := 55
Thanks in advance
Otto

oGetKonto5:bLostFocus = { || oGetKonto5:SetSize( 55, 32 ),;
oGetKonto5:SetFont(oFont ),;
oGetKonto5:nClrText( CLR_OLIVE ),;
oGetKonto5:paint() }

oGetKonto5:bLostFocus = { || oGetKonto5:nWidth := 55,;
oGetKonto5:nHeight := 28,,
oGetKonto5:SetFont(oFont ),;
oGetKonto5:nClrText( CLR_OLIVE ),;
oGetKonto5:paint() }

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: resize a get field on GotFocus
Posted: Mon May 02, 2016 01:45 PM
Otto wrote:Hello Enrico,
Using resize for lostFocus does not clear the background.


Try

Code (fw): Select all Collapse
oGetKonto7:SetSize( 200, 50, .T. )


EMG
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: resize a get field on GotFocus
Posted: Mon May 02, 2016 02:59 PM

Enrico,
thank you. This is working.
Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: resize a get field on GotFocus
Posted: Mon May 02, 2016 03:06 PM


Enrico,

maybe you can help me too how to paint over the other get in the srceen.
I mean the resized Get should overwrite the other one.
Best regards,
Otto
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: resize a get field on GotFocus
Posted: Mon May 02, 2016 03:26 PM

Otto,

can you show me a reduced and self-contained sample showing the problem?

EMG

Continue the discussion