1 (edited by StateOne 2023-05-29 11:24:51)

Topic: Help Required

hi Friends...
i need help in this Project.
i have 2 tanks in grid and want to show graphical tanks using progresbar
when i add 2 tanks then show 2 PBars, if i add 3 tanks then show 3 PBars in Parent groupbox....

Post's attachments

Attachment icon Tank Test.zip 362.84 kb, 65 downloads since 2023-05-29 

Re: Help Required

Hi,

You have already participated in the topic that discussed this issue,
there were also given examples of how this can be done.
Additionally, you can see the forum on the topic ProgressBar.
Everything is well written, read and do.

Re: Help Required

hi thanks;;;
but Requirements are...
when i add any tank then progress bar automatically add.

Re: Help Required

Automatically, this means manually, create a panel and create a progressbar for it in the script. If you know the number of tanks reserve a spot for them. Otherwise, you still have to resize the panels or the form.
Panel1,ProgressBar1,Panel2,ProgressBar2, ...

Re: Help Required

Adding a graph by script, here is an example.

Post's attachments

Attachment icon Quantitée en graphique.zip 364.58 kb, 73 downloads since 2023-05-29 

Destiny

6 (edited by sparrow 2023-05-29 12:32:47)

Re: Help Required

A small note.
You can do without panels, or create one large panel to fit the size of the group box.
ProgressBar.Align := alClient; - you delete this line.
Then these lines start working:
ProgressBar.Left := 25;
ProgressBar Top := 25;
ProgressBar.width := 50;
Progressbar.height := 200;
and you can set the placement, height and thickness of the progressbar yourself.
Naturally, you specify your size and position.

This will eliminate the need to create panels.

Re: Help Required

Thanks Destiny
Small modification. A progressbar and a label are created on the same panel.

example

Post's attachments

Attachment icon Quant en grap-2.zip 355.49 kb, 83 downloads since 2023-05-29 

Re: Help Required

thanks

Re: Help Required

Or maybe it's easier to create all this with a margin and make the unused invisible.
Turn on as needed.

10 (edited by reteinformatica 2023-05-29 19:28:17)

Re: Help Required

Hi all, regarding the 'refresh grid' button, I saw that a SQL query was created.
I wonder if it isn't more practical from the point of view of streamlining the code, which would also be automatic without the need for a button, the instruction:


form.tablegrid.dbupdate

I'm also wondering if the two instructions are the same or one is better than the other.