Author Topic: Event-driven programming  (Read 1501 times)

jj2007

  • Member
  • *****
  • Posts: 7883
  • Assembler is fun ;-)
    • MasmBasic
Re: Event-driven programming
« Reply #30 on: January 02, 2018, 09:21:31 PM »
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

  • Member
  • **
  • Posts: 193
Re: Event-driven programming
« Reply #31 on: January 02, 2018, 09:59:22 PM »
Hi jj2007,

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

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


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

jj2007

  • Member
  • *****
  • Posts: 7883
  • Assembler is fun ;-)
    • MasmBasic
Re: Event-driven programming
« Reply #32 on: January 02, 2018, 10:29:00 PM »
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

  • Member
  • **
  • Posts: 193
Re: Event-driven programming
« Reply #33 on: January 02, 2018, 11:05:27 PM »
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 ...
« Last Edit: January 03, 2018, 01:10:21 AM by LiaoMi »

jj2007

  • Member
  • *****
  • Posts: 7883
  • Assembler is fun ;-)
    • MasmBasic
Re: Event-driven programming
« Reply #34 on: January 02, 2018, 11:43:57 PM »
What do you mean with "press a group of colors"?

LiaoMi

  • Member
  • **
  • Posts: 193
Re: Event-driven programming
« Reply #35 on: January 03, 2018, 01:08:22 AM »
What do you mean with "press a group of colors"?

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

jj2007

  • Member
  • *****
  • Posts: 7883
  • Assembler is fun ;-)
    • MasmBasic
Re: Event-driven programming
« Reply #36 on: January 03, 2018, 01:18:12 AM »
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--

  • Administrator
  • Member
  • ******
  • Posts: 5039
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Event-driven programming
« Reply #37 on: January 03, 2018, 10:30:26 AM »
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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 7883
  • Assembler is fun ;-)
    • MasmBasic
Re: Event-driven programming
« Reply #38 on: January 03, 2018, 10:57:36 AM »
usually spreadsheet tables are usually done with a modified list view control.
Yes, that's what I am using.

Quote
The 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.
« Last Edit: January 03, 2018, 12:08:01 PM by jj2007 »

LiaoMi

  • Member
  • **
  • Posts: 193
Re: Event-driven programming
« Reply #39 on: January 03, 2018, 07:15:13 PM »
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

  • Member
  • *****
  • Posts: 7883
  • Assembler is fun ;-)
    • MasmBasic
Re: Event-driven programming
« Reply #40 on: January 03, 2018, 08:11:17 PM »
Nice demos, LiaoMi. Do you have a link to the documentation of the API? I like SprDemo.exe in particular :t

LiaoMi

  • Member
  • **
  • Posts: 193
Re: Event-driven programming
« Reply #41 on: January 03, 2018, 11:35:02 PM »
This page is no longer available on the Internet. Was there any documentation available? I could not find anything in my archive  :icon_rolleyes: