FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


tableedControl

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 17 Aug 2017 9:37    Post subject: tableedControl Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
Harrison Pratt



Des Moines, Iowa USA
Joined: 05 Nov 2000
Posts: 312

PostPosted: 17 Aug 2017 12:34    Post subject: Reply with quote

Take a look at the listView class and the listView demo project.
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 17 Aug 2017 13:04    Post subject: Reply with quote

Hi,
I know listview for 8 years ago (Vip 6), but I donít think that lisview take real numbers, isínt it ?
Back to top
View user's profile Send private message
Harrison Pratt



Des Moines, Iowa USA
Joined: 05 Nov 2000
Posts: 312

PostPosted: 17 Aug 2017 13:59    Post subject: Reply with quote

Right, you will need to convert them to strings when loading the listView.
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 17 Aug 2017 16:56    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Harrison Pratt



Des Moines, Iowa USA
Joined: 05 Nov 2000
Posts: 312

PostPosted: 17 Aug 2017 19:01    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 18 Aug 2017 6:56    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Harrison Pratt



Des Moines, Iowa USA
Joined: 05 Nov 2000
Posts: 312

PostPosted: 18 Aug 2017 14:49    Post subject: Reply with quote

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:

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/article/Import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba

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.
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 18 Aug 2017 16:37    Post subject: Reply with quote

Hi,
HTML is very interesting but I currently prefer Excel, I usually open files.csv in my programs (read) but I donít know how to do the reverse (write). I'm trying a DDE / OFFICE in Visual Prolog VIP Examples 7.5 but unfortunately without results, I get this:

Got: str("[Classeur1]Feuil1\t[Classeur1]Feuil2\t[Classeur1]Feuil3\tSystem")
Command=[OPEN("E:\Jean Paul\Documents\Visual Prolog Examples VIP 7.5\dde\data\ddetest.xls")]
ddetest.xls not loaded
Item = R1C1

No writing in the ddeTest
so I don't know the code for write on excel file
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 22 Aug 2017 18:45    Post subject: Reply with quote

It's Ok for Excel return but I regret Vip7 TableedControl
Back to top
View user's profile Send private message
Tonton Luc



FRANCE (Le Touquet)
Joined: 16 Oct 2001
Posts: 1548

PostPosted: 31 Aug 2017 6:33    Post subject: Reply with quote

Hi,

In tableedControl.i :

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

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum