FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Get with "flat" border
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Get with "flat" border
Posted: Mon Dec 03, 2007 05:18 PM

Maurilio,

I re-read the message thread and realized you want to use different border colors as indicators.

Still as I pointed out in a previous message, the method Microsoft has started using is coloring the control's background not the border. So you might want to consider doing this instead (and it would not require modification of any of the FW source).

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Get with "flat" border
Posted: Mon Dec 03, 2007 05:30 PM
Maurilio,

Here is an example using controls with colored backgrounds as indicators. The pink field is missing critical data and the yellow field contains questionable data ( the email address is missing the @).

These are a way of addressing my philosophy of not requiring even critical data to be entered before allowing the user to close the dialog. I find that forcing the user to enter all critical fields before closing the dialog just puts the user in the pridicament of having to make up data in order to finish what they are doing. I would rather have no data than wrong data--you can never tell if it is wrong, you can tell if it is missing.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Get with "flat" border
Posted: Tue Dec 04, 2007 10:14 AM

Antonio:
Thanks a lot, I'll try it!

James:
The intention is paint the border with a different color to mandatory fields (for example) to let the user have a visual reference.
Using themes under XP we have controls with line border or "flat style" but who don't use themes or Win98 don't have it. The only way I found to use this flat borders and colored references is changing controls for myself.

Best regards,
Maurilio

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Get with "flat" border
Posted: Tue Dec 04, 2007 04:03 PM

Maurilio,

>The intention is paint the border with a different color to mandatory fields (for example) to let the user have a visual reference.

That is what the pink field is in the example screenshot in my previous message. I have no mandatory fields as explained in my previous message, I call them critical data, but these are what you would call mandatory. They are pink until filled out, then they become white. Or, they could become yellow if the data is suspect.

As I said, if you make fields mandatory and the user doesn't have the needed data, then they will make something up. (I assume by "mandatory" you mean that they must be filled out before the dialog can be saved.)

>Using themes under XP we have controls with line border or "flat style" but who don't use themes or Win98 don't have it. The only way I found to use this flat borders and colored references is changing controls for myself.

You can use field colors in all versions of Windows, and you don't need to modify the FW source. Also, it works with or without themes.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Wed Dec 05, 2007 03:21 AM

This might Tget add more datas to control features, border color, flat style ,underlined style , etc.

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Fri Aug 01, 2008 10:53 AM
Hi,
Why I get as follow ? I modified tget.prg paint as adviced.


redefine get xx id 101 of odlg
...

// "@1,1 get xx of odlg noborder", this do well .
// "redefine get "," .rc removed WS_BORDER , not work well .

Regards!
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Mon Aug 04, 2008 01:05 AM

Hi,
How to disable tget 3D effect or without border ?

redefine get var1 id 101 of odlg

in .rc/dll without WS_BORDER .

EDITTEXT 101, 145, 34, 31, 12

Still with 3D effect .

Thanks !
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Get with "flat" border
Posted: Mon Aug 04, 2008 10:31 AM
   redefine GET oGet VAR var1 id 101 of oDlg 

   oGet:bPainted = { || PaintBorder( oGet, oDlg ) }

   ...

function PaintBorder( oGet, oDlg )

   local aPoint1 := { -1, -1 }
   local aPoint2 := { oGet:nHeight, oGet:nWidth }
   
   aPoint1 = ClientToScreen( oGet:hWnd, aPoint1 )
   aPoint1 = ScreenToClient( oDlg:hWnd, aPoint1 )
   aPoint2 = ClientToScreen( oGet:hWnd, aPoint2 )
   aPoint2 = ScreenToClient( oDlg:hWnd, aPoint2 )
   
   WndBox( oDlg:GetDC(), aPoint1[ 1 ], aPoint1[ 2 ], aPoint2[ 1 ], aPoint2[ 2 ] )
   oDlg:ReleaseDC()
   
return nil

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Tue Aug 05, 2008 01:19 AM
Antonio,
Still paints 3D get :


Regards!
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Get with "flat" border
Posted: Tue Aug 05, 2008 04:43 AM

Shuming,

Please try to reduce the dimensions of the rectangle:

local aPoint2 := { oGet:nHeight - 1, oGet:nWidth - 1 }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Tue Aug 05, 2008 07:31 AM

Antonio,
Is there a way to change oget:nstyle ? so get true no border effect ?
Regards!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Get with "flat" border
Posted: Tue Aug 05, 2008 07:33 AM

Shuming,

As far as we know, Windows only allows to use or not a border, but no the type of the border. Thats why we have to paint ours on top of it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Thu Aug 07, 2008 03:20 AM

Antonio,
According to MR Wensheng Liao's advice, change .rc/dll EXITTEXT --> user defined control, for example:

EDITTEXT 101, 51, 31, 58, 12
change to
CONTROL "", 101,"EDIT",0 , 51, 31, 58, 12

This can do a no border get , then self add a wndbox()

Regards!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Get with "flat" border
Posted: Thu Aug 07, 2008 11:51 AM

EDITTEXT 101, 51, 31, 58, 12

and

CONTROL "", 101,"EDIT",0 , 51, 31, 58, 12

are two different syntaxes for the same control, as far as I know.

EMG

Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Get with "flat" border
Posted: Fri Aug 08, 2008 06:27 AM

E.M.G,

It seems , Tget class can't Recognizing if .rc/dll EDITTEXT with WS_BORDER clause.

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion