Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
9
Erster Beitrag:
vor 4 Jahren, 6 Monaten
Letzter Beitrag:
vor 4 Jahren, 6 Monaten
Beteiligte Autoren:
Michael Q, Fabrice Harari, ccc2, Charles U. Schneiter, Arie, Allard, BG

WD16: How to make a table behave like a spreadsheet?

Startbeitrag von Michael Q am 10.02.2014 14:56

I want to make a table behave like a spreadsheet, something like this:

Each field (or cell) in the table can be selected by Tab or mouse, but not edited. The whole cell is highlighted when selecxted. Then F2 can be pressed and only the selected cell becomes editable. Then after "Enter" is pressed, the cell shows as selected but not editable.

I can't for the life of me get this to work. Does anyone have any links to examples of how to do this?

Thanks,
Michael

Antworten:

Hi
what do you want it to do other then discribed?

Is there initial data in the table? is it linked to something ( file or query )? or is it in memory ?

maybe look at help : http://doc.windev.com/en-US/?1013264&name=programming_the_table_cells&q=Table%20cell,Color

regards allard

von Allard - am 10.02.2014 16:30
Hello,
In "WD- Table Control Edit" We have every thing BUT NOTHING...
See http://27130.foren.mysnip.de/read.php?27131,195961,195961#msg-195961.
-BG

von BG - am 10.02.2014 16:57
Hi Michael

First, I am assuming WINDEV.

>>>Each field (or cell) in the table can be selected by Tab or mouse, but not edited. The whole cell is highlighted when selecxted. Then F2 can be pressed and only the selected cell becomes editable. Then after "Enter" is pressed, the cell shows as selected but not editable.

- All cell should be by default in EDIT mode, so that it's possible to enter them
- In the entry code of each cell, I would put some code that change the cell color background, and change the CURRENT cell mode to NON editable
- when F2 is pressed, I would make them editable again and set the cursor in it by code
- if anything else is pressed, I would UNhighlit the cell and make it editable again

Best regards

von Fabrice Harari - am 10.02.2014 17:51
Michael,
LST83 has an example of exactly this and it is even in WD16 already.
Maybe pcsoft is willing to send you the example
Or you could just buy lst83. If you have to do it all by yourself it will cost you more money and sweat.

See screenshot below. Yes it really is a WD table control and not Excel.



von Arie - am 10.02.2014 18:38
Thanks everyone.

That's given me a way to move past my blockage, I hope!

Michael

von Michael Q - am 11.02.2014 10:09
Thanks to the original poster for asking this question and Fabrice and Arie for pointing out two very interesting solutions to an aspect I didn't even know I would be facing in the near future ;)

Awesome stuff :spos:

If only my French were not this subterraneous... these LST's look like being a treasure chest of neat solutions! :xcool:

von Charles U. Schneiter - am 12.02.2014 10:29
Hi Charles

>>>If only my French were not this subterraneous... these LST's look like being a treasure chest of neat solutions! :xcool:

von Fabrice Harari - am 12.02.2014 12:14
you can use activeX / ole of excel :rp:

von ccc2 - am 12.02.2014 12:30
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.