TableHeadersRow() and disabling the table context menu #829
Closed
JetSetIlly
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
|
This is a simpler alternative that does not call TableHeadersRow() master...JetSetIlly:giu:table_no_header This means that the columns are set up with the correct widths etc. It has the advantage over the previous solution of being more flexible. This is how I would do it with Dear Imgui if I were using the library directly. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I thought that if you don't call Columns method it will not add headers |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was growing frustrated at not being able to disable the table context menu with giu. Is there an accepted way of doing it?
The way I've come up with requires a change to the TableWidgets.go file but it's a simple change. Rather than immediately submitting a pull request, I thought I'd open a discussion to see if my idea is on the right track or if there's an alternative way of doing this already.
For reference, my changes are here:
master...JetSetIlly:giu:table_simple_header
While this is perfect for my immediate use case, I'm a little worried that it's inflexible for general use. In particular, I'm not sure if there's a good way of styling the "simple" header. Should a StyleSetter be given to the table?
Maybe it would be better if the SimpleHeader() function took a StyleSetter argument instead of a boolean. In other words, if the argument is nil then the normal table header is used, and the "simple" header used if a StyleSetter is given. Thoughts?
Also "SimpleHeader()" isn't great naming but it's the best I could come up with. I'd appreciate some feedback on that too.
The advantage of this solution is that the columns are still configured correctly - so they're given the correct size, etc. The only difference as far as I can tell is that the context menu is disabled (unless the TableFlagsContextMenuInBody flag is set)
Regards
Stephen
Beta Was this translation helpful? Give feedback.
All reactions