Questions on the Grid
7 posts
• Page 1 of 1
Questions on the Grid
Ok, its been a while since I have done serious grid work.
I'm looking at doing a "presentation grid" - everything is read-only, so no worrying about the details of editing, pasting etc.
Two questions arise:
1. Any way to get rid of the grid lines between the column titles? Easy to do for the main part of the grid, but I can't see how to do it for the titles.
2. How about horizontal cell padding? Obviously I can make the columns wider, but a right justified column will still bump up uncomfortably close to a left justified column. Short of tacking on some blanks to front or back of the cell content, any solution?
Thanks for any tips.
Paul
I'm looking at doing a "presentation grid" - everything is read-only, so no worrying about the details of editing, pasting etc.
Two questions arise:
1. Any way to get rid of the grid lines between the column titles? Easy to do for the main part of the grid, but I can't see how to do it for the titles.
2. How about horizontal cell padding? Obviously I can make the columns wider, but a right justified column will still bump up uncomfortably close to a left justified column. Short of tacking on some blanks to front or back of the cell content, any solution?
Thanks for any tips.
Paul
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Questions on the Grid
Hi Paul,
1) Sorry, we do not have a setting to remove the dividing lines in the column title headers.
2) For this, our only suggestion is that you use a FormatString on the cells.
Hope this helps!
Regards,
Vince
1) Sorry, we do not have a setting to remove the dividing lines in the column title headers.
2) For this, our only suggestion is that you use a FormatString on the cells.
Hope this helps!
Regards,
Vince
- Vince|Dyalog
- Posts: 413
- Joined: Wed Oct 01, 2008 9:39 am
Re: Questions on the Grid
Thanks Vince.
No problem, that's kind of what I thought.
No problem, that's kind of what I thought.
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Questions on the Grid
Two more questions:
1. Any way to get the upper left hand corner of the grid to change color - want it to match my row title and column title background color.
2. When using a label to provide some feedback to the user so he can tell the current cell, you can click on the current cell after it has the focus and you get in the in-cell editing mode and the contents of the cell are shown without formatting. I understand why this happens for an associated edit (you edit the value, not the display of it), but is there any reason it should happen to a label, which by definition is read-only? Is there a way prevent this behavior. InputMode property does not appear to work for this.
Paul
1. Any way to get the upper left hand corner of the grid to change color - want it to match my row title and column title background color.
2. When using a label to provide some feedback to the user so he can tell the current cell, you can click on the current cell after it has the focus and you get in the in-cell editing mode and the contents of the cell are shown without formatting. I understand why this happens for an associated edit (you edit the value, not the display of it), but is there any reason it should happen to a label, which by definition is read-only? Is there a way prevent this behavior. InputMode property does not appear to work for this.
Paul
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Questions on the Grid
Hi Paul,
1) We do have an RFE (Request for Enhancement) logged for a way to colour the top left part of the Grid.
You could also hide the entire row title area with
F.G.TitleWidth←0
Then, you could try to make the first column of grid values look like your own RowTitles.
2) Could you send some code to Dyalog Support which demonstrates this please?
I tried to create such a grid using code from our supplied wtutor.dws example workspace.
The labels are in column 3 of rows 1 to 5. I cannot edit the underlying values.
Regards,
Vince
1) We do have an RFE (Request for Enhancement) logged for a way to colour the top left part of the Grid.
You could also hide the entire row title area with
F.G.TitleWidth←0
Then, you could try to make the first column of grid values look like your own RowTitles.
2) Could you send some code to Dyalog Support which demonstrates this please?
I tried to create such a grid using code from our supplied wtutor.dws example workspace.
⎕IO←1
'F'⎕WC'form'('posn' 40 0)
'F.G'⎕WC'grid'(10 20⍴9000?10000)('size' 100 100)
F.G.ColTitles←'Surname' 'Job Title' 'Region' 'Salary' 'Perm'
'F.G.E1'⎕WC'Edit'
F.G.Input←'F.G.E1'
JOBS←'Manager' 'Project Leader' 'Consultant'
JOBS,←'Programmer' 'Assistant'
'F.G.JOBS'⎕WC'Combo'JOBS
F.G.Input←'F.G.E1' 'F.G.JOBS'
CT←(⍴EMP)⍴1 ⋄ CT[;2]←2
CT[;3]←3
REGIONS←'North' 'East' 'West' 'Central' 'South'
'F.G.REG'⎕WC'label'
F.G.Input←'F.G.E1' 'F.G.JOBS' 'F.G.REG'
'F.G.SAL'⎕WC'Edit'('FieldType' 'Currency')
F.G.Input←'F.G.E1' 'F.G.JOBS' 'F.G.REG' 'F.G.SAL'
'F.G.PERM'⎕WC'Button'('Style' 'Check')('Align' 'Centre')
F.G.PERM.EdgeStyle←'Plinth'
F.G.Input,←⊂'F.G.PERM'
F.G.CellTypes←CT
F.G.ShowInput←1
The labels are in column 3 of rows 1 to 5. I cannot edit the underlying values.
Regards,
Vince
- Vince|Dyalog
- Posts: 413
- Joined: Wed Oct 01, 2008 9:39 am
Re: Questions on the Grid
Vince,
Thanks for responding, sorry I did not get back sooner.
Regarding coloring the upper left hand corner, I would really appreciate that. It seems to me that no new property is needed - it should be treated as the column titles row or the row titles column (either one would be fine with me.). I will send cases of beer to the office for this.
Regarding the in-cell label problem, here is some code that shows the issue:
To see the problem, click on the grid so it gets the focus. Then click on a cell (once or twice). You will get into in-cell mode, and the formatting for that cell disappears. Given that the cell is by definition read-only, I don't think you should be able to get into in-cell mode at all. It serves no purpose. I understand why formatting disappears in general, while you are editing the cell.
With a date, this is not a big deal, but it became more of an issue when I started doing more interesting formatting for read-only grids. For example, I have integers that are to be displayed as decimal, so I use the K format instruction. I even was using the O format instruction for displaying a small set of integers as 'Yes/No/Etc.' When the user gets into in-cell mode, the string disappears and is replaced with an integer.
Thanks for responding, sorry I did not get back sooner.
Regarding coloring the upper left hand corner, I would really appreciate that. It seems to me that no new property is needed - it should be treated as the column titles row or the row titles column (either one would be fine with me.). I will send cases of beer to the office for this.
Regarding the in-cell label problem, here is some code that shows the issue:
GridTest←{
_←'f'⎕WC'Form'
_←'f.g'⎕WC'Grid'
_←'f.g.l'⎕WC'Label'('Border' 1)('FieldType' 'Numeric')
f.g.l.FormatString←'G<9999-99-99>'
f.g.Input←f.g.l
f.g.Values←4 3⍴20170101+⍳12
f.g.CellTypes←3 4⍴1
0
}
To see the problem, click on the grid so it gets the focus. Then click on a cell (once or twice). You will get into in-cell mode, and the formatting for that cell disappears. Given that the cell is by definition read-only, I don't think you should be able to get into in-cell mode at all. It serves no purpose. I understand why formatting disappears in general, while you are editing the cell.
With a date, this is not a big deal, but it became more of an issue when I started doing more interesting formatting for read-only grids. For example, I have integers that are to be displayed as decimal, so I use the K format instruction. I even was using the O format instruction for displaying a small set of integers as 'Yes/No/Etc.' When the user gets into in-cell mode, the string disappears and is replaced with an integer.
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Questions on the Grid
Hi Paul,
I can reproduce the grid issue with labels and in-cell mode and have logged it as 14564.
I believe that this bug was introduced in September 2010.
Regards,
Vince
I can reproduce the grid issue with labels and in-cell mode and have logged it as 14564.
I believe that this bug was introduced in September 2010.
Regards,
Vince
- Vince|Dyalog
- Posts: 413
- Joined: Wed Oct 01, 2008 9:39 am
7 posts
• Page 1 of 1
Return to Windows: GUI, COM/OLE/ActiveX
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group