Welcome! Log In Create A New Profile

Advanced

Create tables and controls in code

Posted by John Fligg 
John Fligg
Create tables and controls in code
March 21, 2018 06:29PM
Hi All

I am trying to create a table on the fly using code. I know it can be done but just cannot find the Help for it. BTW by Table I mean an Analysis table. I want to create a table with a few fields but in memory on a temporary basis rather than do it in the analysis. Ooops I think I mean Data File.

Also I want to create controls on top of an image. I then want to move it about and resize it. I have looked at ddraw/drectangle etc. but suddenly realised these are not available in Android. I am using Wx21 and do not intend updating any time soon.

Does anyone know if this can be done in WD/WB and WD using some other means?

Many thanks.



Edited 2 time(s). Last edit at 03/21/2018 06:37PM by John Fligg.
Paulo Oliveira
Re: Create tables and controls in code
March 21, 2018 08:09PM
I don't know WM so i can't help you in that.

For the data file check the HDescribeFile (Function)
[doc.windev.com]

To create controls you can use ControlClone (WD/WB/WM) and ControlCreate in WD
[doc.windev.com]
[doc.windev.com]
Allard
Re: Create tables and controls in code
March 22, 2018 12:18AM
I donnot exactly get what you mean with this

Quote
I am trying to create a table on the fly using code. I know it can be done but just cannot find the Help for it. BTW by Table I mean an Analysis table. I want to create a table with a few fields but in memory on a temporary basis rather than do it in the analysis. Ooops I think I mean Data File.

But I 'l l give it a try.

You can create a table with a view columns in it say colums 1,2 3.

Ok now you can add stuff to the colums with :

Tableaddline ( tablename, ........ etc )
Then you can change the columname

table.colums1..caption = "Your columname "

This way you can use the table many times. In windev 1 Have in my latest app onley one table to select things out of many diofferent files ( works als a popup to select stuff)

I just sent params to the window to tellthe window what it must load so I can the select it

Regards
Allard
Mark Crichton
Re: Create tables and controls in code
March 22, 2018 07:56PM
Hi Allard

How do you print a report from the data table you have created. If you do? Windev report writer won't do it outside of the project as you cant attach the table to the analysis ( I forget the command ). Do you use 3rd party , and if so which one?
John Fligg
Re: Create tables and controls in code
March 23, 2018 10:10AM
Thank you Paulo. Not your fault of course but this is getting so frustrating these days. HDescribe file is not available in Android. If it is available in W22 then I am sure they are locking us into an update cycle as I have no plans to update any time soon.

Thx all the same.
Allard
Re: Create tables and controls in code
March 23, 2018 12:19PM
Hi,

I donot know if with the aaf that is possible. I believe you can print to excel and word.

Hmm in windev 22 I get the message direct print or open reports en queries when running exe and when running from windev direct print and create new report ( this doesnot do anything .

So I Guess it is not possible.

regards
Allard
Paulo Oliveira
Re: Create tables and controls in code
March 23, 2018 01:23PM
If you only need it in memory why don't you use one array of structures for instance.

I don't know your requirements but usually in memory operations are easier and faster using arrays.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: