Skip to content

Is it possible to create a "grid" layout programmatically with add panel? #420

Answered by mathuo
mikedidthis asked this question in Q&A
Discussion options

You must be logged in to vote

Glad you like it!

There are some docs on the addPanel method you may find useful here

https://dockview.dev/docs/next/components/dockview#add-panel

To briefly explain, you can provide a position object which takes a couple of arguments which help position the panel. You can position the new panel relative to an existing panel by providing referencePanel or an existing group by providing referenceGroup. You can also provide a direction which will be relative to the referencePanel or referenceGroup if provided and if not provided the direction is absolute.

Here is a quick sandbox showing the layout you mention created using addPanel and a variety of positioning options, you could achieve the…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikedidthis
Comment options

Answer selected by mikedidthis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants