Get with "flat" border
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
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
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
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
>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
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Code: Select all
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
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China