Page 1 of 1

tableedControl

Posted: 17 Aug 2017 9:37
by Gass
Can anyone tell me how to use Vip 7's tableedControl with customControl on Vip 7.5 or 8 in pfc/gui/controls, or no . In this case there is perhaps another solution more easy for output database with integer, string and real numbers? Thanks :D

Posted: 17 Aug 2017 12:34
by Harrison Pratt
Take a look at the listView class and the listView demo project.

Posted: 17 Aug 2017 13:04
by Gass
lisview

Posted: 17 Aug 2017 13:59
by Harrison Pratt
Right, you will need to convert them to strings when loading the listView.

Posted: 17 Aug 2017 16:56
by Gass
Hi,
I agree, but not quite satisfied because I have doubts about the tri list; Ex "10.5" < "9.5" it seems. But I will take ListView of course, if I have no better.
Thanks

Posted: 17 Aug 2017 19:01
by Harrison Pratt
You mentioned only "output" in your original post, so if you want to query the displayed data then another approach will be needed.

Another way, if you are just interested in quick and dirty display, is to write your data to an HTML-table file and open that file in your favorite browser.

Posted: 18 Aug 2017 6:56
by Gass
indeed, this solution is very elegant, but I don'nt know language HTLM or I have'nt examples for. Why then not also exporting data table to excel? It's possible also no ? Perhaps do you know examples for my help concerning HTLM or excel? Thank's

Posted: 18 Aug 2017 14:49
by Harrison Pratt
See here for HTML table structure: https://www.w3schools.com/html/html_tables.asp

The table structure might look intimidating at first, but remember that for your application you (probably) won't need to do the fancy (but helpful) indenting. With a little thought you can figure out how to write a table header (<th> ... </th> ) with one line of code whose predicate declaration looks something like this:

Code: Select all

emitHeaderList( outputStream YourFile, string_list Headers )
The same technique will work for the table data (<td> ...<\td> ) rows.


Excel will happily open CSV (character separated values) files that you write from your application. The separators most commonly used are ',' and the tab character ( '\t' ). I prefer using tab because then fields can contain embedded commas. Some fields may need to be quoted with '"'. See this: https://support.office.com/en-us/articl ... 9e391393ba

Try mocking up a small data table in Excel that looks like the data you want to display, then SaveAs CSV file and also SaveAs TXT (tab-separated file). You can open these in Notepad or other editor to see how to format the data you write to disk.

Remember, you can launch Excel from your program, too.

Posted: 18 Aug 2017 16:37
by Gass

Posted: 22 Aug 2017 18:45
by Gass
It's Ok for Excel return but I regret Vip7 TableedControl

Posted: 31 Aug 2017 6:33
by Tonton Luc
Hi,

In tableedControl.i :

Code: Select all

tableedit_type = te_integer;    % INTEGER column type                  te_real;       % REAL column type                  te_long;       % INTEGER column type                  te_string;     % STRING column type (default: STRING column type)                  te_picture.    % picture column type