Get with "flat" border
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
Get with "flat" border
Hi!
How can I create a get with flat style border? Using FW 16 bits was only set 3D look to false, but with FWH the get border don't get "flat" style...
I tryend oGet:l3Dlook := .F.
regards
Maurilio
How can I create a get with flat style border? Using FW 16 bits was only set 3D look to false, but with FWH the get border don't get "flat" style...
I tryend oGet:l3Dlook := .F.
regards
Maurilio
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Using NOBORDER clause while defining Get displays the Get FLAT without any border. ( Whether using Themes or not )
If NOBORDER is NOT used, if the application is Themed Get is displayed with single line border and if the application is Not Themed Get is displayed in 3D box style.
If NOBORDER is NOT used, if the application is Themed Get is displayed with single line border and if the application is Not Themed Get is displayed in 3D box style.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
A 'Easy dialog ' sample from Easy report site http://www.reportdesigner.info shows thes tget no 3D but with border clause.
Some other software 'GET' only with underline .
Someone who knows this?
Thanks !
Shuming Wang
Some other software 'GET' only with underline .
Someone who knows this?
Thanks !
Shuming Wang
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Maurilio,
This is a working solution. Maybe there is a simpler code for it, but we haven't found it yet. The advantage of this system is that you can choose the border color and thickness:
This is a working solution. Maybe there is a simpler code for it, but we haven't found it yet. The advantage of this system is that you can choose the border color and thickness:
Code: Select all
#include "FiveWin.ch"
function Main()
local oDlg, oGet, cTest := Space( 20 )
DEFINE DIALOG oDlg
@ 2, 2 GET oGet VAR cTest SIZE 80, 10 NOBORDER
oGet:bPainted = { || PaintBorder( oGet, oDlg ) }
ACTIVATE DIALOG oDlg CENTERED
return nil
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
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Maurilio,
>I think paint blue or red obligatory fields to user get a visual reference.
I show the background color of the GET as pink if the field is required and empty, and yellow if the field contains questionable data.
You may note that Microsoft has starting doing something simlar--the address field in IE is green when the site is safe.
James
>I think paint blue or red obligatory fields to user get a visual reference.
I show the background color of the GET as pink if the field is required and empty, and yellow if the field contains questionable data.
You may note that Microsoft has starting doing something simlar--the address field in IE is green when the site is safe.
James
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
Antonio,
I changed my TGet.prg Paint method to draw a rectangle before DispEnd() call. I created a pen with the color I want the border. And worked fine (I must try under Win 98).
But I want to do the same in combobox control. Do you have idea of a place to insert rectangle call to draw the "new" border of combobox?
Regards,
Maurilio
I changed my TGet.prg Paint method to draw a rectangle before DispEnd() call. I created a pen with the color I want the border. And worked fine (I must try under Win 98).
But I want to do the same in combobox control. Do you have idea of a place to insert rectangle call to draw the "new" border of combobox?
Regards,
Maurilio
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Maurilio,
You have to implement Method Paint() in Class TComboBox and do similar as we do in Class TButtonBmp: (source\classes\buttonb.prg)
Also you may need to add:
You have to implement Method Paint() in Class TComboBox and do similar as we do in Class TButtonBmp: (source\classes\buttonb.prg)
Code: Select all
METHOD Paint() CLASS TComboBox
local aInfo := ::DispBegin()
CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 )
If( ! Empty( ::bPainted ), Eval( ::bPainted, ::hDC ),)
::DispEnd()
return 1
Code: Select all
METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact: