Can text in a wxTextCntl be scrolled without a scrollbar?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
TexasJimbo
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun May 04, 2008 6:41 pm

Can text in a wxTextCntl be scrolled without a scrollbar?

Post by TexasJimbo »

I am trying to build a teleprompter. Basically, I have a window with my text. Lets say the text is 5000 words, but the window only displays 500 at a time. I want to automatically scroll the text in this window. I don't want a scrollbar as I want it to move automatically.

Can this be done in a Text Control? Would it have to be done another way. I was thinking I could send scroll events to the window to reposition the text in the window. Since I have never used scroll events before and especially since I don't want a scroll bar I am not sure this can be done. Any thoughts?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Can text in a wxTextCntl be scrolled without a scrollbar?

Post by ONEEYEMAN »

Hi,
Will you be using single- or multi-line control?

Thank you.
TexasJimbo
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun May 04, 2008 6:41 pm

Re: Can text in a wxTextCntl be scrolled without a scrollbar?

Post by TexasJimbo »

multi-line control
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Can text in a wxTextCntl be scrolled without a scrollbar?

Post by ONEEYEMAN »

Hi,
Please show some code of what you already tried.

Thank you.
User avatar
doublemax@work
Super wx Problem Solver
Super wx Problem Solver
Posts: 474
Joined: Wed Jul 29, 2020 6:06 pm
Location: NRW, Germany

Re: Can text in a wxTextCntl be scrolled without a scrollbar?

Post by doublemax@work »

As wxTextCtrl does not derive from wxScrolledWindow, i doubt you'll be able to scroll it smoothly programmatically.

For your purpose i would suggest a wxHtmlWindow with wxHW_SCROLLBAR_NEVER flag.
https://docs.wxwidgets.org/trunk/classw ... indow.html
Post Reply