Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Border Color
Message
De
29/09/2018 12:47:40
 
 
À
28/09/2018 08:51:25
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01662372
Message ID:
01662396
Vues:
52
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform