Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Border Color
Message
From
29/09/2018 12:47:40
 
 
To
28/09/2018 08:51:25
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01662372
Message ID:
01662396
Views:
51
>>Hi!
>>
>>Is ist possible to set the Border Color of the GridObject?
>
>I've seen solutions where there'd be a line around the grid. Four lines, that is, with some distinct color (depending on focus that would change), while the gridlines were some lighter shade of gray. Looks good, to be honest. And the code isn't too complicated, even with a few bindevent()s to support resizing.


Dragan,

I think it is better to use a shape instead of 4 lines, less code and easy to maintain, colour thickness etc and it (can) anchor with the form/gdrid
**************************************************
*-- Class:        myform (d:\foxexamples\grid\gridwithcoloredborder\gwcb.vcx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   09/29/18 06:41:05 PM
*
DEFINE CLASS myform AS form


	Top = 0
	Left = 0
	Height = 277
	Width = 405
	DoCreate = .T.
	Caption = "Form"
	BackColor = RGB(255,255,255)
	Name = "myform"


	ADD OBJECT shape1 AS shape WITH ;
		Top = 24, ;
		Left = 36, ;
		Height = 208, ;
		Width = 330, ;
		Anchor = 15, ;
		BorderStyle = 6, ;
		BorderWidth = 2, ;
		Curvature = 0, ;
		BorderColor = RGB(255,0,0), ;
		Name = "Shape1"


	ADD OBJECT grid1 AS grid WITH ;
		Anchor = 15, ;
		Height = 204, ;
		Left = 38, ;
		Top = 26, ;
		Width = 326, ;
		Name = "Grid1"


	PROCEDURE Load
		IF !USED('customers')
			USE HOME(2)+'\northwind\customers' SHARED
		endif
	ENDPROC


ENDDEFINE
*
*-- EndDefine: myform
**************************************************
Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform