Page 2 of 3

Re: Border around GET

Posted: Fri May 13, 2011 9:36 am
by Silvio
uwe,
can I create the border after I press button on one dialog to controll if there is a value or I can show the border of the get directly by pass valid control ?

sample :
if there is no customer name I cannot save the record and alI show the border of the gets must be no empty

Re: Border around GET

Posted: Sat May 14, 2011 6:34 pm
by ukoenig
Silvio,

I'm working on a nice Tool, to test everything at Runtime :
Dialog-Background and different Borderstyles like :
Border ( around )
Shadow ( Bottom / Right )
Underline


Borders on any Control.
Blinking Borders on Valid, defined Border-distance from Control-outlines and much more.
Selections are saved to a INI-file.
Still the Color-selections for Focus / Lostfocus must be added.

Image

Image

Image

Best Regards
Uwe :lol:

Re: Border around GET

Posted: Mon May 16, 2011 8:33 am
by ukoenig
The Border-painter is nearly finished.
Still the Sourceeditor must be included.
You can change the Brush, Focus- and Lostfocus-color at Runtime.
Changing the Borderstyle, Daniel's Restart-function is used.
All Settings are saved to a Ini-file.

Image

Best Regards
Uwe :lol:

Re: Border around GET

Posted: Mon May 16, 2011 9:31 am
by Silvio
can you make a little sample test with a only get ?

Re: Border around GET

Posted: Mon May 16, 2011 11:53 am
by Marcelo Via Giglio
Uwe,

nice work, some years ago I try to do the same to show the focus, but how can this work with radio buttons and check buttons group ?, because the focus should be for all the group not for one of them only

regards

Marcelo

Re: Border around GET

Posted: Mon May 16, 2011 12:24 pm
by ukoenig
Marcelo,

the problem occurs as well with Multiline gets.
I use a fixed Height in case the Height cannot be calculated, to define the Area.
A bit testing is needed.
I will add Radios and Checkboxes to the Tool, to see how it works.

oGet1:bGotFocus := {|hDC| Draw_Box( oDlg, oGet1, nColorF, nSpace, nPen, 130, nStyle, nShPos ) }
oGet1:bLostFocus := {|hDC| Draw_Box( oDlg, oGet1, nColorL, nSpace, nPen, 130, nStyle, nShPos ) }

Focus on Checkbox

Image

Best Regards
Uwe :lol:

Re: Border around GET

Posted: Sat Sep 22, 2012 8:10 am
by fraxzi
Dear Uwe,

Hi! Reviving this thread..

How to draw border around TTIMEPICK and TDATEPICK gets?

Kind regards,

Re: Border around GET

Posted: Sat Sep 22, 2012 8:39 am
by fraxzi
Dear All,

It seems :bPainted of TTIMEPICK and TDATEPICK not working..?

Kind Regards,

Re: Border around GET

Posted: Sat Sep 22, 2012 11:06 am
by ukoenig
Hello Frances,

did You have a look at the Samples Datetime.prg and Testdtp.prg ?

Image

Image

Best Regards
Uwe :?:

Re: Border around GET

Posted: Sat Sep 22, 2012 12:24 pm
by RuFerSo
Hi Mr. Uwe.

Could you please try something like this...

This style of this get looks very, very nice.
Redefine Get oGet Var MiVar ID 120 of oDlg When .F. ....> This get is Disable (for the when .f.) but looks very nice)
Could be possible a get that look like this but Enable?

Sorry for my bad English...

Best regards
Ruben Fernandez

Re: Border around GET

Posted: Mon Sep 24, 2012 12:39 am
by fraxzi
Dear Uwe,

This is the Datepicker with the same :bPainted as Get object.. which does not display boders..

Image

While :bGetFocus and :bLostFocus works as this image shows..

Image


I would like a permanent borders as gets.. Just a simple purpose of visual aesthetics on my FWH apps..

Re: Border around GET

Posted: Mon Sep 24, 2012 8:15 am
by ukoenig
Frances,

I added these two tests,
Is that the solution, You are looking for
Pensize, Color ( focus, lost ) and space can be defined .

Image

Best Regards
Uwe :?:

Re: Border around GET

Posted: Mon Sep 24, 2012 9:04 am
by fraxzi
Dear Uwe,

It has to be in ::bPainted

Re: Border around GET

Posted: Mon Sep 24, 2012 1:14 pm
by ukoenig
Ruben,
do You mean a Border, or just changing the get-color itself ?

Frances,
I think it is not supported, tested but nothing happens.

From DTPICKER.CH :

[ <oDTPicker> := ] TDatePick():ReDefine( <nId>, bSETGET(<uVar>),;
<oDlg>, <nHelpId>, <nClrFore>, <nClrBack>, <oFont>, <oCursor>,;
<cMsg>, <.update.>, <{uWhen}>, <{uValid}>,;
[\{|nKey, nFlags, Self| <uChange>\}], <pic> )

[ <oTMPicker> := ] TTimePick():Redefine( <nId>, bSETGET(<uVar>),;
<oDlg>, <nHelpId>, <nClrFore>, <nClrBack>, <oFont>, <oCursor>,;
<cMsg>, <.update.>, <{uWhen}>, <{uValid}>,;
[\{|nKey, nFlags, Self| <uChange>\}] )

Best Regards
Uwe :?:

Re: Border around GET

Posted: Tue Sep 25, 2012 12:25 am
by fraxzi
Dear Uwe,

Yes it didn't fire-up the :bPainted.. :(

But using :bLostFocus and :bGotFocus works but need to focus (by mouse) to TDatePick to draw borders..
If I use oDate:SetFocus() it didn't draw the border.