News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Event-driven programming

Started by jj2007, January 28, 2017, 08:51:02 PM

Previous topic - Next topic

jj2007

We are almost there! Work in progress, the final version will be under 100 lines of code, the exe has 54,784 bytes.

The app features a menu, static, edit, richedit, date+time, progressbar, trackbar, button controls, it can open the links to MasmBasic and MSDN, and the spreadsheet at the bottom can be edited and saved.

LiaoMi

Hi jj2007,

I have a bug, Im running from the desktop  :redface:

---------------------------
Fatal error:
---------------------------
Could not open
FatTable.tab
for Recall, FileRead$ etc.


---------------------------
OK   
---------------------------

jj2007

Hmmm... sorry, it expects that file. If you have Excel, take a spreadsheet and save it tab-delimited as fattable.tab. Can't post one right now.

LiaoMi

#33
The mathematical table is borrowed here https://www.rapidtables.com/math/symbols/Basic_Math_Symbols.html - Basic math symbols.

If you press if you open a group of colors, there will be a black color by default, if you click cancel, the color changes anyway ...

jj2007

What do you mean with "press a group of colors"?

LiaoMi

Quote from: jj2007 on January 02, 2018, 11:43:57 PM
What do you mean with "press a group of colors"?

I apologize for mental shift :icon_redface: Edit > Group Colour > Cancel

jj2007

Ah, ok! I was so concentrated on getting the table control right that I had forgotten that there is functionality behind one of the menus :bgrin:

Next step will be to teach the table control to do some things automagically, like detecting whether the spreadsheet is in tab or csv format; maybe offer a choice between "use first line in spreadsheet as header text" vs "use A B C as in Excel". Row colours could be set by the user, too; and first of all, a simple way to access elements of the table (and that part is easy).

If anybody has clear ideas what are essential features of a spreadsheet control, post them here, please.

hutch--

JJ,

Its been a long time since I have done on but usually spreadsheet tables are usually done with a modified list view control. I confess I never liked the interface to a listview control and see the common controls as an ugly add on interface but you can get them to work if you are patient. The listview control usually has the selectable bar at the top so you don't have to use the first line as headings.

jj2007

#38
Quote from: hutch-- on January 03, 2018, 10:30:26 AMusually spreadsheet tables are usually done with a modified list view control.
Yes, that's what I am using.

QuoteThe listview control usually has the selectable bar at the top so you don't have to use the first line as headings.
I plan to leave it to the user/coder if the first line is used for the SysHeader32. Excel, for example, uses just A...Z, AA, AB, etc
But it may look nicer, and has practical advantages, to use line 0 as headers, see screenshot below and attached latest version, btw with an excerpt from a real tricky UN database.

LiaoMi

An example was taken from the site radasm.cherrytree.at, I like the ability to use graphics from the table  :icon14: The example application is SprDemo.exe


jj2007

Nice demos, LiaoMi. Do you have a link to the documentation of the API? I like SprDemo.exe in particular :t

LiaoMi

This page is no longer available on the Internet. Was there any documentation available? I could not find anything in my archive  :icon_rolleyes:

jj2007

My flu is getting better, and version 2 looks almost OK. Testing requires FatTable.tab in the same folder as the exe, the archive can be downloaded here.

The source needs a lot of polishing still, my apologies that I don't dare to include it here. Note that the FatTable.tab can be loaded also with Excel, MS Word or LibreOffice Calc. It just takes a little bit longer - assembly rocks :badgrin:

Note also that:

- LibreOffice complains after ca. 20 seconds that it can't load everything, "excess rows not loaded bla bla", but the last ten rows or so are there. But don't take that as proof of correctness: Further up many rows are missing, about 400 or 10% of the whole database. Interesting for a spreadsheet software, aren't they meant for accounting and other legal & financial stuff?

- MS Excel loads it in "only" 3-4 seconds, with about 50 lines more because Excel can't handle the occasional linefeed in a cell (FatTable.tab contains an official UN database).

Have fun ;)

jj2007

New version, with embedded data. Inter alia, there is now a search function, just hit Ctrl F.
Right-clicking opens a context menu. Note that e.g. "Show selection" won't work if you selected megabytes of data :(
Undo with Ctrl Z and Redo with Ctrl Y work (in view mode, press Escape if you are in edit mode)
This is still work in progress - use at your own risk, and not for valuable data.