Table Control

The use of specific JADE features and proposals for new feature suggestions
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Table Control

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:43 am

by Craig Shearer >> Wed, 12 Jul 2000 21:25:19 GMT

Hello All

I've decided to start a thread about JADE's Table control. Many people have complained about its lack of features, but let's discuss what we'd like to see. There are a number of enhancements that developers can make (and have made) to the Table control to make it better, but there are some things that are either impossible to achieve, or better left to the plant to implement.

To start the ball rolling, one feature I'd like to see implemented would be the automatic elipsis (...) appearing in cells where the column width is insufficient for the text to fit. This is a really nice feature of Microsoft-style Table controls, and is virtually impossible to implement in JADE.

I'd also like to be able to have more control over the way gridlines are displayed - I'd like to be able to turn gridlines off for some columns, and perhaps draw them in a 3D style.

I'd also like to be able to turn off resizing for some columns.

Comments?
Craig.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Table Control

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:43 am

by Stephen Persson >> Thu, 13 Jul 2000 0:07:21 GMT

Hmmm... where does one start

This biggest thing I would like to see if the ability to be able to enter text into the cells EASILY without a whole lot of messy code in the background trying to handle it all.
In particular:
* The ability to have a combination of Input Types.
In my case type None & TextNumeric. If I click on a cell I want the whole thing selected (type = None) when I start typing I want the type TextNumeric. However putting a type change on , say, the keyDown event, doesn't exactly work - you end up with the first char at the end of your typing - Eg elloh instead of hello. You also want to check the key pressed isn't a navigation key (up, down, left, right) or a key such as Alt, Shift or Ctrl before you clear the text in the cell and make it of type TextNumeric.
It just gets toooo messy.

* The selStart would also be nice to have - so you can progmatically put the cursor straight to the end of the cell text (when type = TextNumeric).

* Be nice to be able to overwrite the Tab key. I know Tabs go between controls and thats what they are supposed to do - but if you have a table with cells of type TextNumeric the left/right keys move along the text. So if you want to go to the next cell it scrolls all the way along the text then once its at the end goes to the next cell. No matter what you put in the keyPress event it won't do a thing with the Tab.
We have an app that has a lot of code numbers that need to be entered in, and this is a big complaint from the speed typists!

* Multiple lines of text in cells are difficult to use. Once the cell has the focus you can no longer see all the lines - only the line you are on. A bit of a nuisance if you want to check your text furthur up. The easiest way is to change cells so the whole lot is shown - then go back to the cell again - not nice.
When a multiple lined cell gets the focus it always puts the cursor at the end of the paragraph (or was it the beginning? can't recall sorry) - navigating around the paragraph you want to alter, is then a nightmare. Basically it would be nice to have all the text shown all the time, and let you click anywhere in the text to edit it.

My point in all this is that they are extremely messy to try and do nicely.

That'll do for now...
Stephen

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Table Control

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:44 am

by Anonymous >> Tue, 19 Sep 2000 6:01:26 GMT

The reason that the table keyPress or keyDown events cant do anything with the Tab key is because key events are processed by the form before the table control gets to see them. The default action of the form in response to
receiving the Tab key is to move the focus to the next control in tab order. What you have to do is put some code into the form's keyDown event method to deal with the Tab key (keyPress doesn't work) .

Usually you would subclass the table control so that you can identify that the table control is of that sort for which you want special behaviour. You can keep track of which control has the focus by coding the
gotFocus method of the form and saving a reference to the control with the current focus.

In the keyDown event on the form you check if the control with the focus is the sort you want using isKindOf. If the Tab or Shift Tab key was received, change the keyCode to a right or left arrow and return. That should get the effect you want. You can also do a similar trick with the enter key by setting the keyCode to a down arrow. This makes the table behave like a spreadsheet for data entry purposes.

Cheers Bill

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Table Control

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:44 am

by Anonymous >> Tue, 19 Sep 2000 6:01:26 GMT

The reason that the table keyPress or keyDown events cant do anything with the Tab key is because key events are processed by the form before the table control gets to see them. The default action of the form in response to
receiving the Tab key is to move the focus to the next control in tab order. What you have to do is put some code into the form's keyDown event method to deal with the Tab key (keyPress doesn't work) .

Usually you would subclass the table control so that you can identify that the table control is of that sort for which you want special behaviour. You can keep track of which control has the focus by coding the
gotFocus method of the form and saving a reference to the control with the current focus.

In the keyDown event on the form you check if the control with the focus is the sort you want using isKindOf. If the Tab or Shift Tab key was received, change the keyCode to a right or left arrow and return. That should get the effect you want. You can also do a similar trick with the enter key by setting the keyCode to a down arrow. This makes the table behave like a spreadsheet for data entry purposes.

Cheers Bill

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Table Control

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:44 am

by Stephen Persson >> Thu, 13 Jul 2000 0:07:21 GMT

Hmmm... where does one start

This biggest thing I would like to see if the ability to be able to enter text into the cells EASILY without a whole lot of messy code in the background trying to handle it all.
In particular:
* The ability to have a combination of Input Types.
In my case type None & TextNumeric. If I click on a cell I want the whole thing selected (type = None) when I start typing I want the type TextNumeric. However putting a type change on , say, the keyDown event, doesn't exactly work - you end up with the first char at the end of your typing - Eg elloh instead of hello. You also want to check the key pressed isn't a navigation key (up, down, left, right) or a key such as Alt, Shift or Ctrl before you clear the text in the cell and make it of type TextNumeric.
It just gets toooo messy.

* The selStart would also be nice to have - so you can progmatically put the cursor straight to the end of the cell text (when type = TextNumeric).

* Be nice to be able to overwrite the Tab key. I know Tabs go between controls and thats what they are supposed to do - but if you have a table with cells of type TextNumeric the left/right keys move along the text. So if you want to go to the next cell it scrolls all the way along the text then once its at the end goes to the next cell. No matter what you put in the keyPress event it won't do a thing with the Tab.
We have an app that has a lot of code numbers that need to be entered in, and this is a big complaint from the speed typists!

* Multiple lines of text in cells are difficult to use. Once the cell has the focus you can no longer see all the lines - only the line you are on. A bit of a nuisance if you want to check your text furthur up. The easiest way is to change cells so the whole lot is shown - then go back to the cell again - not nice.
When a multiple lined cell gets the focus it always puts the cursor at the end of the paragraph (or was it the beginning? can't recall sorry) - navigating around the paragraph you want to alter, is then a nightmare. Basically it would be nice to have all the text shown all the time, and let you click anywhere in the text to edit it.

My point in all this is that they are extremely messy to try and do nicely.

That'll do for now...
Stephen


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 11 guests

cron