J2ME - Dynamic Table/Grid with editable cells. - java-me

How can I create a table in which I can add rows and columns dynamically?
How can I make cells of that dynamic table editable? I.e. I should push Edit Command button and write texts or numbers in the cell.

Take a look at LWUIT which has one of the best listview implementations in J2ME

Although it is old, you may take a look at MicroCalc to get some ideas about the implementation.
It is a spreadsheet implemented in J2ME under GPL license.

AFAIK, there is no such UI control that is available in MIDP, you should either create the control or use some library such as J2ME-Polish

Related

Render custom content in sheet cell (PrimeFaces Extensions)

I have another question regardless PF Extensions. Is it possible for example in one particular column to display custom (generic) column type. For example datePicker, Textarea, DecimalNumber, just Text or DropDown Menu. So for every single row it can be different content in this column. Is this idea possible or not really? Many thanks!
This issue has been raised before and its not so simple with the HandsonTable. Its doable just not simple.
See: https://github.com/primefaces-extensions/primefaces-extensions/issues/136

Tabulator: Access to columns with keyboard

I am trying to create a table using the Tabulator library, and I'm encountering a problem with accessibility.
Using any of the examples on the Tabulator site which have column sorting, I need to tab into the column and use the space bar or enter key to sort the column (simulating a click or a touch). However, I am unable to use keyboard to access the columns - it appears that only a mouse click is possible.
Are there any settings when declaring my columns that I can use to gain keyboard accessibility to the columns?
This functionality is not built in at present, If you would like to see the functionality added to the library please create a Feature Request

javaFX textarea - columns/rows

The textarea-class in JavaFX should give me the option to add rows and columns, but the way I tried didn't work:
TextArea ta = new TextArea();
ta.setPrefRowCount(100);
ta.setPrefColumnCount(100);
I'm searching for columns/rows like in Microsoft Excel, inclusive the gridines.
.setGridLinesVisible(true);
doesn't work for this Type.
For use case similiar to Excel you're actually looking for TableView. Every table cell can contain anything, even another window so it is very flexible.
If you want grid lines on top of TextArea, but want to keep the standard TextArea behavior, you will have to combine the TextArea and TableView in a StackPane.
You will just have to clear the table's background using CSS.
However, matching the row and column sizes with the text will need some additional code.
Apologies for my English.
colums/rows like in Microsoft Excel, inclusive the gridines
TableView as recommended in Michael's answer is likely the right basic solution for.
There are some 3rd party controls you might consider which add some basic spreadsheet like functionality to the base JavaFX TableView control:
SpreadsheetView from the ControlsFX project.
TiwulFX from Panemu.

How to specify the width of site column in a list?

I have developed a list in SharePoint. While entering new item in it, like name, if I keep on typing it gets spread over a line making the width of cloumn spread over page. I want to limit the width of site column so as the column's value spreads over multiple lines instead of spreading over one. How can I do this setting?
This is not a setting you can configure in SharePoint. You will need to write some custom code using css and possibly javascript that will set the width of the column. You can make a change like this in SharePoint Designer.
You must use min-width (CSS) in your block.
You have to create custom XSLT for this. There you have loop all the column and need to specify the overflow:auto, hidden,.. CSS property. So it automatically get effect based on your internal name of the field.
So whereever you have the field it automatically get affected. If it for one single view you can use JavaScript to achieve this but this is not right way to do.
The data you are entering can be displayed in many ways. Today in a table format, tomorrow in a dropdown etc. You should distinguish between:
limiting the amount of data that can be entered in a site column (can be done in SharePoint alone, when you design your list)
limiting the wrapping of the words in a table cell today or trimming the values in a dropdown tomorrow (can be done using HTML/CSS "nowrap" if you display the list values in a browser app, or differently if you show the values in a WinForms app)

DrawItem in listbox (VC++)

When we will use DrawItem for a listbox?
Normally, if the listbox is ownerdraw, we will use DrawItem. What are the other senarios we use drawitem?
To elaborate on Rashmi Pandit; A ListBox with override DrawItem can also be used to 'visualize' objects. In a project I'm working on, a ListBox is used to display rows from a database. Each row / item is visualized using formatted Strings, Icons etc.
Overriding DrawItem (and MeasureItem!) is ideal for this purpose. Of course, the internal structure has to be tweaked a bit (the standard Items property cannot be used for objects), but it is certainly worthwhile.
Message WM_DRAWITEM is sent only to owner-drawn List boxes.
You can use DrawItem when you want to override the default implementation and custom the way a listbox is drawn. For e.g. in the list there might be some item which should is the default item and you would want it to be highlighted so that the user knows it is the default item.
Here's an eg for a combo in C#: Higlighting a particular item in a combo box

Resources