Recent

Author Topic: Can I dynamically build tapplication/desktop  (Read 3766 times)

Janus

  • New Member
  • *
  • Posts: 11
Can I dynamically build tapplication/desktop
« on: March 26, 2018, 02:56:53 am »
I am tired of chasing my tail, and I am sorry if I am asking this wrong.
What I am wanting is to dynamically build my desktop.

Start with a base window.
Resize that window based on the desktop of the machine it is running on.
Determine font size based on window.
Add file/edit/view main menus.
Add tab bar, then pages for each tab.
Add status bar to bottom.

I have been trying to trace through how the LCL works, and not been making enough progress to matter.

While I could easily build what I need with php/mysql/javascript/html.
I want to combine the presentation with the actual program to do the work.
I can't just generate pdfs like I normally would since presentation needs to be dynamic.

I was hoping the LCL would be easier to read through.
My mistake, I rarely get into the esoteric parts of pascal since they are so seldom needed for what I do.
Now I just hoping someone can point me in the right direction since I can't seem to find it.

Thank you for your time.


Janus.

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Can I dynamically build tapplication/desktop
« Reply #1 on: March 26, 2018, 03:28:55 am »
Lazarus is an application builder not a presentation tool.

 You can drag and drop items to create the form then build it..

 The end results is a PROGRAM, not some script file for a presentation.

 You can create a presentation tool from Lazarus much in the same why Lazarus dose it.

 So what is it you are actually trying to do?

 1. Use Laz as a program builder

 2. Use Laz as a presentation tool?

Jamie
The only true wisdom is knowing you know nothing

Janus

  • New Member
  • *
  • Posts: 11
Re: Can I dynamically build tapplication/desktop
« Reply #2 on: March 26, 2018, 04:03:48 am »
@jamie

I have not made a GUI program from scratch before, only modified existing ones.
I am not a application maker, just a tool maker.

The TUI programs I have made from scratch have been made using a modified FV library with no run loop.
I had believed the LCL could be modified the same way.

What I is a program that presents data it derives after doing a conversion.
Part of my problem is that I do not know precisely the data it will have after running.

If dynamic layout is not within the structure of the LCL, then I will look elsewhere.

Normally I derive the data, then dump it to file(s) which I then run through other programs.
Lately I have have used php/json/websocket/html/javascript to create dynamic presentations.
However, that is a delicate mess, and automatic recognition binary data formats in php is hard.

My hope was to combine work for a customer with something I have been wanting to learn anyway.
However, if static layout is what the LCL does, then as I said, no problem.

I had no intention to offend if I have.
Thank you for taking the time to answer.


Janus.


Janus

  • New Member
  • *
  • Posts: 11
Re: Can I dynamically build tapplication/desktop
« Reply #4 on: March 26, 2018, 08:00:31 am »
@valdir.marcos

Thank you very much.

Hopefully this will tell me if I am wasting my time or not.


Janus.

kupferstecher

  • Hero Member
  • *****
  • Posts: 583
Re: Can I dynamically build tapplication/desktop
« Reply #5 on: March 26, 2018, 12:33:45 pm »
I'm not sure if the articles linked by valdir.marcos are helpful for you, Janus.

What do you actually try to achieve?

When building a program with changing layout, one normally still uses a static designed form, and modifies the forms content on runtime. Like the menu, it is normally more or less clear on designtime. You also can make several pages with TNotebook e.g. or embedd other forms into your main window. The controls on the forms of course you can change in any way you like on runtime: Move their position (properties .Left, .Top), their size (.Width, .Height), their texts, colors, alignment, docking, behaviours, everything. You can hide them (.Visible). You can delete them and completely create them on runtime. Start with an empty project and discover the available controls in the first two menu tabs. Play around with them and also try to understand the event handlers. E.g. with OnResize you can change (or keep) the layout when the application window changes its size, respecively when a control changes its size.

But perhaps your question aimed for something else? :)



Janus

  • New Member
  • *
  • Posts: 11
Re: Can I dynamically build tapplication/desktop
« Reply #6 on: March 26, 2018, 09:39:01 pm »
@kupferstecher

I have been looking through what was presented, and I am still not sure if I can use it.

I have data with an indeterminate number of columns and rows, from multiple sources.
Often these are hardware logs, software logs, or measurements taken over time.
Sometimes I have a time sync, sometimes I need to derive one.
Documentation from manufacturers often has holes, inaccuracies, mistakes, glitches, and what honestly feels like the occasional outright lie.

Currently, for small known or mostly static tables,  I use a horribly limited FV in 80 column that recognizes types based on contents, then builds the desktop and components on the fly.
It is every bit as messy and delicate as it sounds.

My other system opens a network connection to mysql front end I wrote, and injects data into tables as needed.
The front end is written in php, and is also a websocket server.
When the data is updated, it tells the connected web browswer(s), and they react accordingly.
The browser(s) use the web socket to request table info, then build a page based on tables with scrolling lists.
This lets me perform several analyses on the data in parallel.
Sometimes leaving old data up as a guide while I recompile extraction tools, then run again with the updates.
It also, is every bit as messy and delicate as it sounds.
It is also a memory and storage hog.

My hope was to combine the two by finally creating a dynamic GUI system without having to write it from scratch in GLUT or some other graphics toolkit.

If need to, I am not worried about it, that is life.
I have more than one use for this however, and had hoped to combine some paid work research with a hobby.


Janus.

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Can I dynamically build tapplication/desktop
« Reply #7 on: March 27, 2018, 12:10:41 am »
laz will allow you to build a skeleton GUI as a starter and then you can add things at runtime as needed.

For example a TPage with Tabsheets on it, You don't need to populate all the sheets think you need at runtime, you can
add a sheet to the page control as needed at runtime..

 The same goes for things like Listboxes, Combobox etc... They allow you to add entried at runtime, change their
positions for the user, set visibility for user, etc..

 As for the standard menu above, it is customary to put in all the expected options but if for some reason an option isn't
currently supported due to some runtime variable or resources not in place you can set options to DISABLE at runtime which
will give you grey effect and disable its function.

  As for items eating up memory, that's a problem on most tools/Apps .. The idea is to design your program so that it
use file (HD) resources when things start getting a little heavy with memory..

 So Laz can be used to create tools in a way that they can be adaptive to the job currently running, meaning you can have
your tool create more Components as needed at runtime and give them living space on the forms if they are visual or simply
manage memory in the background with the CReates and Free's

 But the point is, LAZ is a Application builder, it can create tools like you have already been using, only it can create them
exactly the way you want it to behave...
 
 There are examples that come with the install, you may want to look at some of them and get  a feel for it.


 
The only true wisdom is knowing you know nothing

Janus

  • New Member
  • *
  • Posts: 11
Re: Can I dynamically build tapplication/desktop
« Reply #8 on: April 04, 2018, 09:24:30 am »
I wanted to say thank you to everyone who tried to help me.

I had to go another way for this, but I will try again to use FPC/Lazarus in future.


Janus.

 

TinyPortal © 2005-2018