Imgui: Scroll to bottom when using InputTextMultiline.

Created on 9 Sep 2018  路  2Comments  路  Source: ocornut/imgui

Hei 馃憤
I ame wondering how i can scroll to bottom when using InputTextMultiline.
I have tryd ImGui::SetScrollHere(); and SetWindowScrollY but no luck getting it to actly scroll to the bottom without it buging up. (flicering and text jumping around)

I ame currently using the logger struct where i have switched out TextUnformatted with InputTextMultiline.
Maby you have a bether ideas insted of using InputTextMultiline. (I want to be able to copy the text and when a new line is added it scroll to that line,) 馃槃

But my current problem is to get it to scroll to the buttom the same way as whan using TextUnformatted.

PS.
Keep up the good work.
I love the project and you are a amazing person with a big and a amazing brain 馃憤

inputtext

Most helpful comment

I have tryd ImGui::SetScrollHere(); and SetWindowScrollY but no luck getting it to actly scroll to the bottom without it buging up.

If you try something please post the code so people can understand what you are referring to and maybe see if you missed an existing solution.

I ame currently using the logger struct where i have switched out TextUnformatted with InputTextMultiline.
Maby you have a bether ideas insted of using InputTextMultiline. (I want to be able to copy the text and when a new line is added it scroll to that line,)

It's not easily possible at the moment. We are missing a way to create arbitrary "selectable" text.

I would suggest using regular TextUnformatted calls + a "Copy To Clipboard" button like the Demos are already doing.

InputTextMultiline() will work better in your case if you use the InputTextFlags_ReadOnly but it still won't scroll.

Note that your problem may be better reframed as "Move the cursor to the end" (#1972) instead of "Scroll to the end", there's already an open issue for that.

Keep up the good work

Thank you.

All 2 comments

I have tryd ImGui::SetScrollHere(); and SetWindowScrollY but no luck getting it to actly scroll to the bottom without it buging up.

If you try something please post the code so people can understand what you are referring to and maybe see if you missed an existing solution.

I ame currently using the logger struct where i have switched out TextUnformatted with InputTextMultiline.
Maby you have a bether ideas insted of using InputTextMultiline. (I want to be able to copy the text and when a new line is added it scroll to that line,)

It's not easily possible at the moment. We are missing a way to create arbitrary "selectable" text.

I would suggest using regular TextUnformatted calls + a "Copy To Clipboard" button like the Demos are already doing.

InputTextMultiline() will work better in your case if you use the InputTextFlags_ReadOnly but it still won't scroll.

Note that your problem may be better reframed as "Move the cursor to the end" (#1972) instead of "Scroll to the end", there's already an open issue for that.

Keep up the good work

Thank you.

yeah, ok.
You know how to scroll to bottom inside the InputTextMultiline function without clicking inside the window. If so i can just edit the function and make a bool that can be set to true when i want it to scroll to bottom.? If so that had been a ok solution for me right now :) @ocornut

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bizehao picture bizehao  路  3Comments

mnemode2 picture mnemode2  路  3Comments

KaungZawHtet picture KaungZawHtet  路  3Comments

mkanakis picture mkanakis  路  3Comments

noche-x picture noche-x  路  3Comments