Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Border line around the column

Status
Not open for further replies.

Sng1

Programmer
Aug 3, 2021
58
0
0
IN
Grid's allowcellselection is true and the border is to be removed. Which property will I have to set?
Img_v7vxll.png
 
The property is GridLines and there are four choices; both, vertical, horizontal, and none.

However, I think you have that set to none already, so maybe look at the current control's BorderStyle

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
I second Griff, but I think this is the active cell frame you won't get rid off.

Chriss
 
I played a bit with the Highlight properties of the grid.

Highlight seems to be concerned about cell highlighting on top of row highlighting, which involves several of the other highlight properties. But Highlight=.t. also only has an effect if AllowCellSelection is .t., which you have set to .F.

HighlightRowLineWidth controls the thickness of a line border for the whole row, not just the active cell, so that's of no use for your problem, you can only set that to 0 instead of or additional to setting HighlightRow to .F. to have the same effect.

I get no border around anything if I make these settings:

AllowCellSelection: .F.
GridLines: 0
Highlight: .F.
HighlightRow: .F.
HighlightRowLineWidth: 0
HighlightStyle: 0

But HighlightStyle 0 means legacy highlighting, which means the active row is highlighted by a dark blue backcolor and inverted text forecolor.
With HighlightStyle 1 or 2 that color is controlled by HighlightBackcolor and HighlightForecolor.

If you set them to white backcolor and black forecolor you have no highlighting, but still override the DynamicBackColor and DynamicForeColor of columns, so you lose all gridlines and highlight lines, but also all color for the active row.



Chriss
 
Looking at your screenshot the numbering on the left side seems to tell that the two lines for 4) are considered one two line text, but are shown in two rows of a grid.

You could instead use a memo field and higher the grid rowheight, then use an editbox as currentcontrol of that column. Then the two line value is in one record and has one dynamicbackcolor. The obvious disadvantage is that you can't dynamically have one and two line height rows mixed, all records will have the same height.

Chriss
 
Chris said:
The obvious disadvantage is that you can't dynamically have one and two line height rows mixed, all records will have the same height.

That's why I have done this way because I have vwry few columns which require double row height.

Chris said:
HighlightRow: .F.
worked for me and now it is giving me desired results.

Thanks a lot Chriss. Sorry for delay responding but I didn't received email notification though I have ticked for the same in forum's setting.
 
I didn't received email notification though I have ticked for the same in forum's setting

I've never used email notification myself, but other people in the forum say that it often fails to work.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Sng1,

no problem. It's fine you got it working. I would have bet you already had HighlightRow .f. as your border only surrounds one cell, while row highlighting is a border on top/bottom of all rows cells and the leftmost and rightmost cell, with HighlightRowLineWidth. But the cell right to your problematic cell already has no borderlines.

I think for future users with a similar need, it would be good to know what you have in all those different properties that influence the highlighting by border frame and colors. Can you manage to post this? A screenshot of the grid properties around Highlight would be the simplest you could share.



Chriss
 
I have reported the post above, please do likewise andit might be unwise to click on the link.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top