resize a get field on GotFocus

resize a get field on GotFocus

Postby Otto » Sun May 01, 2016 5: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() }
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: resize a get field on GotFocus

Postby ukoenig » Sun May 01, 2016 5: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

Image

regards
Uwe :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: resize a get field on GotFocus

Postby Otto » Sun May 01, 2016 11:46 pm

Hallo Uwe,
vielen Dank. Funktioniert super.
Danke und liebe Grüße
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: resize a get field on GotFocus

Postby Enrico Maria Giordano » Mon May 02, 2016 10:55 am

Otto wrote:I tried with: oGetKonto7:Resize( 0, 200, 50 )
But this does not work.


Code: Select all  Expand view
oGetKonto7:SetSize( 200, 50 )


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

Re: resize a get field on GotFocus

Postby Otto » Mon May 02, 2016 1: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() }
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: resize a get field on GotFocus

Postby Enrico Maria Giordano » Mon May 02, 2016 1:45 pm

Otto wrote:Hello Enrico,
Using resize for lostFocus does not clear the background.


Try

Code: Select all  Expand view
oGetKonto7:SetSize( 200, 50, .T. )


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

Re: resize a get field on GotFocus

Postby Otto » Mon May 02, 2016 2:59 pm

Enrico,
thank you. This is working.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: resize a get field on GotFocus

Postby Otto » Mon May 02, 2016 3:06 pm

Image

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: resize a get field on GotFocus

Postby Enrico Maria Giordano » Mon May 02, 2016 3:26 pm

Otto,

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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 102 guests