Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables: select the whole line with a selectable or another way #3151

Closed
aiekick opened this issue Apr 22, 2020 · 8 comments
Closed

Tables: select the whole line with a selectable or another way #3151

aiekick opened this issue Apr 22, 2020 · 8 comments

Comments

@aiekick
Copy link
Contributor

aiekick commented Apr 22, 2020

Version: 1.77
Branch: Tables

the tables branch Iwork like a charm for my ImGuiFileDialog,
created a branch here, for use table instead of just list.

by the way im using a selectable in the first cell.
Is there a way for draw selection on the whole line ?
maybe if all collumns of one line can be selected when one item of one line is mouse hovered or clicked ?

BZOPSWcqrI

@ocornut
Copy link
Owner

ocornut commented Apr 22, 2020

Check the flags for Selectable()

@aiekick
Copy link
Contributor Author

aiekick commented Apr 22, 2020

haha, im ridiculous.
It's working. it was so easy. thank you so much :)

@ocornut ocornut closed this as completed Apr 22, 2020
@ocornut
Copy link
Owner

ocornut commented Apr 23, 2020

To make this thread useful to other readers, the answer is you can use Selectable() with the ImGuiSelectableFlags_SpanAllColumns flag.

@sairus7
Copy link

sairus7 commented Oct 5, 2023

What about table tree with selection via ImGuiTreeNodeFlags_Selected?
image

@ocornut
Copy link
Owner

ocornut commented Oct 5, 2023

There’s an equivalent SpanAllColumns flags for tree nodes.

@sairus7
Copy link

sairus7 commented Oct 5, 2023

Where exactly? Didn't find anything in ImGuiTableFlags_

@ocornut
Copy link
Owner

ocornut commented Oct 5, 2023

My bad there is actually no ImGuiTreeNodeFlags_SpanAllColumns flag, let me get back to you later.

@ocornut ocornut changed the title [Tables] select the whole line with a selectable or another way Tables: select the whole line with a selectable or another way Oct 5, 2023
@ocornut
Copy link
Owner

ocornut commented Oct 5, 2023

I have now added ImGuiTreeNodeFlags_SpanAllColumns with 2c07d58.
I am a little confused as to why this was added/requested before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants