You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 22, 2024. It is now read-only.
there is a way... some calculations needed...
$width = trim(system("tput cols")); //get the width of the screen
but i guess this guy has abandoned this awesome project
conrad10781
added a commit
to conrad10781/clitable
that referenced
this issue
Sep 1, 2023
I've added this functionality to my fork of the project ( conrad10781@9b68c09 )
You can either merge into your fork, or use my fork.
Only update that's needed is a change of your initialization of CliTable. There is now a third parameter to center the table, which is false by default, so not to break any existing installs. I also have a fix to #6 if you were doing that which currently has a PR on this project. If that gets merged, I'll submit a PR for the table centering and you won't need my project.
In any event, if you previously used something like:
$table = newCliTable;
It will now need to be something like the following. Most important part is the 3rd parameter, which needs to be true to center.
$table = newCliTable('Row', true, true);
One other key point, in my usage of the library, I have occasionally created tables larger than the width of my screen. If that's the case, it doesn't matter whether or not you pass "true", the value will be ignored unless there is available space to center.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Can you tell me if there is a way to display the table at the middle of the screen, and if not do you think you can add this feature.
Thanks
The text was updated successfully, but these errors were encountered: