[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scrolling/keeping textArea down (episode III)
[Thread Prev] | [Thread Next]
- Subject: Re: Scrolling/keeping textArea down (episode III)
- From: Lee <t.lee.davidson@xxxxxxxxx>
- Date: Sun, 28 Sep 2025 16:03:16 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 9/25/25 8:38 PM, Benoît Minisini wrote:
Hi,I have just committed a dirty hacky fix to workaround the utterly stupid broken design of the GTK3+ GtkTextView widget used for implementing the TextArea control.I had to use private GTK+3 structures, so it may break in older or future releases of GTK+3 different than mine. You will tell me, and I will adapt the fix if problems arise.
Since you have gotten no response (perhaps Dmitry no longer cares), I went ahead and compiled 'master' from source. With Gianluigi's simple code (shown below), .EnsureVisible seems to work quite well -- with one exception.If the content of the TextArea is scrolled all the way to the top with the mouse wheel, not by dragging the srollbar, when new text is added, by clicking Button1, it is not made fully visible until the mouse cursor re-enters the TextArea control. Personally, I could live with that.
Thank you for your effort, Benoît. [code] Public Sub Form_Open() Dim s As String = File.Load("./lorem.txt") TextArea1.Text = s TextArea1.EnsureVisible End Public Sub Button1_Click() TextArea1.Text &= "\n" & TextBox1.Text TextArea1.EnsureVisible End [/code] [System] Gambas=3.20.99 2fcf6e5a1 (master) OperatingSystem=Linux Distribution=Debian GNU/Linux 12 (bookworm) Kernel=6.1.0-40-amd64 Architecture=x86_64 Cores=2 Memory=3915M Language=en_US.UTF-8 Platform=x11 Desktop=LXQT DesktopResolution=96 DesktopScale=7 WidgetTheme=adwaita Font=Sans,10 DarkTheme=False [Programs] dpkg=Debian 'dpkg' package management program version 1.21.22 (amd64). gcc=gcc (Debian 12.2.0-14+deb12u1) 12.2.0 git=git version 2.39.5 msgmerge=msgmerge (GNU gettext-tools) 0.21 [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.8.0 DBus=libdbus-1.so.3.32.4 GDK2=libgdk-x11-2.0.so.0.2400.33 GDK3=libgdk-3.so.0.2406.32 GStreamer=libgstreamer-1.0.so.0.2200.0 GTK+2=libgtk-x11-2.0.so.0.2400.33 GTK+3=libgtk-3.so.0.2406.32 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.126.0.0 QT5=libQt5Core.so.5.15.8 QT6=libQt6Core.so.6.4.2 RSvg=librsvg-2.so.2.48.0 SDL=libSDL2-2.0.so.0.2600.5 SQLite3=libsqlite3.so.0.8.6 [Environment] BROWSER=firefox DBUS_SESSION_BUS_ADDRESS=unix:path=/run/<user>/1000/bus DESKTOP_SESSION=lxqt DISPLAY=:0 GB_GUI=gb.gtk3 GPG_AGENT_INFO=/run/<user>/1000/gnupg/S.gpg-agent:0:1 GTK_CSD=0 GTK_MODULES=gail:atk-bridge GTK_OVERLAY_SCROLLING=0 HOME=<home> LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LOGNAME=<user> LXQT_SESSION_CONFIG=session PAM_KWALLET5_LOGIN=/run/<user>/1000/kwallet5.socket PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games PWD=<home> QT_ACCESSIBILITY=1 QT_LOGGING_RULES=*.debug=false QT_PLATFORM_PLUGIN=lxqt QT_QPA_PLATFORMTHEME=lxqt SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1392 SSH_AUTH_SOCK=/tmp/ssh-TMStVGqDTeJq/agent.1348 TERM=qterminal TZ=:/etc/localtime USER=<user> XAUTHORITY=<home>/.Xauthority XDG_CACHE_HOME=<home>/.cache XDG_CONFIG_DIRS=/etc:/etc/xdg:/usr/share XDG_CONFIG_HOME=<home>/.config XDG_CURRENT_DESKTOP=LXQt XDG_DATA_DIRS=<home>/.local/share:/usr/local/share:/usr/share XDG_DATA_HOME=<home>/.local/share XDG_MENU_PREFIX=lxqt- XDG_RUNTIME_DIR=/run/<user>/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=<user> XDG_SESSION_DESKTOP=LXQt XDG_SESSION_ID=3 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 XDG_SESSION_TYPE=x11 XDG_VTNR=7 -- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
Re: Scrolling/keeping textArea down (episode III) | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: Scrolling/keeping textArea down (episode III) | Admin <admin@xxxxxxxxxx> |
Scrolling/keeping textArea down (episode III) | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |