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

ImGui::InputText - set text from buffer #6962

Closed
ElectroidDes opened this issue Oct 26, 2023 · 1 comment
Closed

ImGui::InputText - set text from buffer #6962

ElectroidDes opened this issue Oct 26, 2023 · 1 comment

Comments

@ElectroidDes
Copy link

Please tell me, is it possible using ImGui::InputText to set text in the input field from the buffer, completely replacing the text in the input field, and not just using the keyboard?

I know this can be done initially when creating the ImGui::InputText:

std::string buffer = "Preview text";

ImGui::InputText(&title_name[0], &buffer[0], ...);

But how to do this at any time after creating the InputText? Is this possible?

@ocornut
Copy link
Owner

ocornut commented Oct 30, 2023

The simplified answer is currently "it's not possible"
But please refer to similar or identical issues for details: #3878 #2881 #5054 #2890

@ocornut ocornut closed this as completed Oct 30, 2023
ocornut added a commit that referenced this issue Feb 7, 2024
Very highly requested feature (#6962, #5219, #3290, #4627, #5054, #3878, #2881, #1506, #1216, #968).
Also useful for interactive completion/selection popups (#2057, #718)
Based on @kudaba PR. Design for Inputtext V2 should make this obsolete.
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

2 participants