How can i delete rows and/or columns in a gs:table? there seems to be only the option to add them..or am i missing something? Furthermore i cannot delete a gs:table when i try to do so with gs:dispose i get the message
dispose cannot be applied to MAIN:row-table
How to delete rows,columns and table's?
Re: How to delete rows,columns and table's?
Only entire containers created with gs:window, gs:frame and gs:dialog can be used with gs:dispose - this has now been added to the documentation.
At the moment there is no API to delete table rows or columns. For other dialog components use gs:remove-from, or use gs:delete-tag to remove 2D drawn objects.
Se also: http://www.newlisp.org/guiserver/guiserver.lsp.html
At the moment there is no API to delete table rows or columns. For other dialog components use gs:remove-from, or use gs:delete-tag to remove 2D drawn objects.
Se also: http://www.newlisp.org/guiserver/guiserver.lsp.html
Re: How to delete rows,columns and table's?
Thx for the reply, i'll dispose the frame and rebuilt it after i've recalculated the UI.
I also saw there seemed to be no option to have a table without column headers, but you can actually achieve this with an empty string "" as the column header so will give you a table with two columns but you don't see the column header.
I also saw there seemed to be no option to have a table without column headers, but you can actually achieve this with an empty string "" as the column header so
Code: Select all
(gs:table 'row-table 'gs:no-action "" "")
Re: How to delete rows,columns and table's?
Currently when adding columns using gs:table-add-column, the column number will be added as a label when specifying an empty string.
In the next version of guiserver.jar the header will be suppressed if an empty string is used with gs:table-add-column. This will make it possible to add columns to header-less tables created with a gs:table statement using empty string headers.
See: http://www.newlisp.org/downloads/develo ... nprogress/
In the next version of guiserver.jar the header will be suppressed if an empty string is used with gs:table-add-column. This will make it possible to add columns to header-less tables created with a gs:table statement using empty string headers.
See: http://www.newlisp.org/downloads/develo ... nprogress/
Re: How to delete rows,columns and table's?
Great! Are you also planning to add the ability to delete rows and columns? At the moment i dispose the frame and then recalc and recreate the frame , which doesn't matter too much because i have to recalc all the tables (6) anyway but it does of course means flickering.
Re: How to delete rows,columns and table's?
Hi , i've added the ability to delete rows and columns in a table in a build i made in 10.5.4
I have added the following methods to Dispatcher.java:
and implemented them in TableWidget.java.
Then i've coded the new functions in newlisp in guiserver.lsp.
After compiling the java stuff and make /make build, everything seems to work!
I was surprised how easy this was and am very impressed by the documentation and the clean code, everything 'just works' ;-)
Be aware that i'm not a professional programmer so who knows what errors I made but if Lutz is interested i'll be more then happy to share my code to include this in future versions.
I have added the following methods to Dispatcher.java:
Code: Select all
methods.put("table-remove-row", "tableRemoveRow"); //deleting of a row
methods.put("table-set-column-name", "tableSetColumnIdentifiers");//add/delete/update
methods.put("table-set-rows", "tableSetRowCount"); //adding /deleting rows
Then i've coded the new functions in newlisp in guiserver.lsp.
After compiling the java stuff and make /make build, everything seems to work!
I was surprised how easy this was and am very impressed by the documentation and the clean code, everything 'just works' ;-)
Be aware that i'm not a professional programmer so who knows what errors I made but if Lutz is interested i'll be more then happy to share my code to include this in future versions.
Re: How to delete rows,columns and table's?
Thanks very much fdb.
You can package TableWidget.java, guiserver.lsp and table-demo.lsp into a .zip or a .tgz file and mail it to me at lutz@nuevatec.com or publish the files else if you prefer.
Keep the description in guiserver.lsp short but add buttons and input to table-demo.lsp showing the new functionality. This way people have an example to work off and it also can be used to test the new functionality.
You can package TableWidget.java, guiserver.lsp and table-demo.lsp into a .zip or a .tgz file and mail it to me at lutz@nuevatec.com or publish the files else if you prefer.
Keep the description in guiserver.lsp short but add buttons and input to table-demo.lsp showing the new functionality. This way people have an example to work off and it also can be used to test the new functionality.
-
- Posts: 21
- Joined: Mon Sep 14, 2015 3:09 am
Re: How to delete rows,columns and table's?
Thanks very much.
ไพ่ออนไลน์
ไพ่ออนไลน์