Topic: Accordion

Hi Dmitry,


Is it possible for us to display data in accordion style as used in MVD (db tables / currency field type) ? If so, how?

https://s31.postimg.org/8xhvqt0zv/zzzzz_Temp2.png

Adam
God... please help me become the person my dog thinks I am.

Re: Accordion

Hi Adam,
I don't know if Dmitry has something specific that he can suggest. 
But 'accordions' aren't really much more than clicking on a label to pop open a panel or another label (or a tablegrid or an image etc etc).
See if the attached gives you any ideas.
Derek.

Post's attachments

Attachment icon adam accordion.zip 337.36 kb, 466 downloads since 2017-02-25 

3 (edited by AD1408 2017-02-25 13:49:20)

Re: Accordion

Hi Derek,


Thank you very much for the example.


I like it to do bit more. Here is the illustration of what I wanted do:


https://s31.postimg.org/ekph0x0qz/zzzzz_Temp4.png


As you can see form is expanded where not enough space and following accordion header also pushed down.
Also when new accordion header expanded, previous open accordion is collapsed.

Adam
God... please help me become the person my dog thinks I am.

Re: Accordion

See the attached file. I also added another feature, I think you will like it.

Post's attachments

Attachment icon adam accordion_fixed.zip 6.72 kb, 468 downloads since 2017-02-25 

5 (edited by AD1408 2017-02-25 18:39:32)

Re: Accordion

bemorhona-qt wrote:

See the attached file. I also added another feature, I think you will like it.


Nice work bemorhona-qt... Thank you very much..................


Only part remains that when accordion content is bigger then to expand the form size to fit in the form but I can live with what you have done.


Here is the panels version example that requires resizing the form when expanded

Post's attachments

Attachment icon adam accordion fixed test1.zip 6.5 kb, 465 downloads since 2017-02-25 

Adam
God... please help me become the person my dog thinks I am.

Re: Accordion

you can change the size of form1 on click, try it yourself, if not then i will help you. also attach your real project and describe what you want, it wuould be easier to help you.

Re: Accordion

bemorhona-qt wrote:

you can change the size of form1 on click, try it yourself, if not then i will help you. also attach your real project and describe what you want, it wuould be easier to help you.


Tried the following but no luck

procedure Form1_OnClick (Sender: string);
begin
      if Form1.Worcester_L.Visible then
         begin
              Form1.Worcester.Caption:= '- WORCESTER';
              Form1.Worcester_L.Visible:= True;
              Form1.Height:= 331;
         end;
end;

I haven't started the project I'm thinking to use accordion. The idea is not to show every fields on the form to user immediately so that they would choose which fields are needed for the task in hand.

Adam
God... please help me become the person my dog thinks I am.

Re: Accordion

Your have misunderstood me, when I said OnClick, I meant - procedure Form1_WORCESTER_OnClick (Sender: string);
Your procedure is not right, change it and you will see the result.

Re: Accordion

bemorhona-qt wrote:

Your have misunderstood me, when I said OnClick, I meant - procedure Form1_WORCESTER_OnClick (Sender: string);
Your procedure is not right, change it and you will see the result.


Got it... Now it works all fine...


Thanks a lot for your kind help bemorhona-qt.............................

Adam
God... please help me become the person my dog thinks I am.