[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SpinBox with PopupMenu


I have submitted a fix as Benoit looks busy updating the wiki.
https://gitlab.com/gambas/gambas/-/merge_requests/391

I just added "If Me.PopupMenu And If Not Mouse,Left Then Return" to the
MouseUp/Mouse/Down events so buttons do nothing if a PopupMenu exists and
Left mouse was not used.

Respects
BruceS


On Thu, 27 Mar 2025 at 12:57, Bruce Steers <bsteers4@xxxxxxxxx> wrote:

> Aah apologies I see what you mean now, no it's not normal it's a bug.
>
> Yes like you say if you have a popup menu the and right click the up or
> down buttons they get the mousedown event to start changing the value but
> the popup then obscures the mouseup event so the value just keeps changing
> like holding the mouse down unless you click a button again with left mouse.
>
>
> BruceS
>
> On Thu, 27 Mar 2025 at 11:40, Bruce Steers <bsteers4@xxxxxxxxx> wrote:
>
>> it's normal.
>>
>> A spinbox is a compound control made from a TextBox and 2 buttons.
>> The popup is attached to the TextBox only but not the -+ buttons.
>>
>> BruceS
>>
>>
>> On Thu, 27 Mar 2025 at 10:11, CD <claude.dessere@xxxxxxxxx> wrote:
>>
>>> Hello,
>>>
>>> In a form, I have a spinbox with a value from 0 to 255 and a popupmenu
>>> that
>>> appears when I right-click on the spinbox.
>>>
>>> Considering three areas in the spinbox:
>>> 1) the area where the value is displayed
>>> 2) the + (plus) button area
>>> 3) the - (minus) button area
>>>
>>> to display the menu allowing you to select a value that will be assigned
>>> to the
>>> spinbox's Step property,
>>>
>>> - if you right-click on area 1: normal behavior, the popup menu is
>>> displayed...
>>>
>>> - if you right-click on area 2 (+) and the displayed value is less than
>>> MaxValue
>>> the spinbox increments to MaxValue while the popup menu is displayed
>>>
>>> - if you right-click on area 3 (-) and the displayed value is greater
>>> than
>>> MinValue
>>> the spinbox decrements to MinValue while the popup menu is displayed
>>>
>>> Is this normal behavior?
>>> See attached project.
>>>
>>> Sincerely
>>>
>>>
>>> [System]
>>> Gambas=3.19.4
>>> OperatingSystem=Linux
>>> Distribution=Ubuntu 24.04.2 LTS (Noble Numbat)
>>> Kernel=6.8.0-55-generic
>>> Architecture=x86_64
>>> Cores=8
>>> Memory=7817M
>>> Language=fr_FR.UTF-8
>>> Platform=x11
>>> Desktop=MATE
>>> DesktopResolution=96
>>> DesktopScale=9
>>> WidgetTheme=blackmate
>>> Font=Ubuntu Mono,12
>>> [Programs]
>>> dpkg=Programme « dpkg » de gestion de paquets Debian version 1.22.6
>>> (amd64).
>>> gcc=gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
>>> git=git version 2.43.0
>>> msgmerge=msgmerge (GNU gettext-tools) 0.21
>>> rpmbuild=RPM version 4.18.2
>>> [Libraries]
>>> Cairo=libcairo.so.2.11800.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.2409.32
>>> GStreamer=libgstreamer-1.0.so.0.2402.0
>>> GTK+2=libgtk-x11-2.0.so.0.2400.33
>>> GTK+3=libgtk-3.so.0.2409.32
>>> OpenGL=libGL.so.1.7.0
>>> Poppler=libpoppler.so.118.0.0
>>> Poppler=libpoppler.so.134.0.0
>>> Poppler=libpoppler.so.73.0.0
>>> QT5=libQt5Core.so.5.15.13
>>> RSvg=librsvg-2.so.2.50.0
>>> SDL=libSDL2-2.0.so.0.3000.0
>>> SQLite 3=libsqlite3.so.0.8.6
>>> [Environment]
>>> COMPIZ_CONFIG_PROFILE=mate
>>> DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>>> DEBUGINFOD_URLS=https://debuginfod.ubuntu.com
>>> DEFAULTS_PATH=/usr/share/gconf/mate.default.path
>>> DESKTOP_SESSION=mate
>>> DISPLAY=:0
>>> GB_GUI=gb.gtk3
>>> GDMSESSION=mate
>>> GDM_LANG=fr_FR
>>> GIO_LAUNCHED_DESKTOP_FILE=<home>/Bureau/gambas3.desktop
>>> GIO_LAUNCHED_DESKTOP_FILE_PID=394886
>>> GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
>>> GTK3_MODULES=xapp-gtk3-module
>>> GTK_MODULES=appmenu-gtk-module:gail:atk-bridge:canberra-gtk-module
>>> GTK_OVERLAY_SCROLLING=0
>>> HOME=<home>
>>> INSIDE_CAJA_PYTHON=
>>> LANG=fr_FR.UTF-8
>>> LANGUAGE=fr_FR.UTF-8
>>> LC_ADDRESS=fr_FR.UTF-8
>>> LC_ALL=fr_FR.UTF-8
>>> LC_IDENTIFICATION=fr_FR.UTF-8
>>> LC_MEASUREMENT=fr_FR.UTF-8
>>> LC_MONETARY=fr_FR.UTF-8
>>> LC_NAME=fr_FR.UTF-8
>>> LC_NUMERIC=fr_FR.UTF-8
>>> LC_PAPER=fr_FR.UTF-8
>>> LC_TELEPHONE=fr_FR.UTF-8
>>> LC_TIME=fr_FR.UTF-8
>>> LOGNAME=<user>
>>> MANDATORY_PATH=/usr/share/gconf/mate.mandatory.path
>>> MATE_DESKTOP_SESSION_ID=this-is-deprecated
>>> PAPERSIZE=a4
>>>
>>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
>>> r/local/games:/snap/bin
>>> PWD=<home>
>>> QT_ACCESSIBILITY=1
>>> QT_FONT_DPI=96
>>> QT_LOGGING_RULES=*.debug=false
>>> QT_QPA_PLATFORMTHEME=gtk2
>>> QT_SCALE_FACTOR=1
>>>
>>> SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/2296,unix/<hostname>:/tmp/.ICE-
>>> unix/2296
>>> SHELL=/bin/bash
>>> SHLVL=0
>>> SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
>>> TZ=:/etc/localtime
>>> UBUNTU_MENUPROXY=1
>>> USER=<user>
>>> XAUTHORITY=<home>/.Xauthority
>>> XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg
>>> XDG_CURRENT_DESKTOP=MATE
>>>
>>> XDG_DATA_DIRS=/usr/share/mate:/usr/share/mate:/usr/share/gnome:/usr/local/share:
>>> /usr/share:/var/lib/snapd/desktop
>>> XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<user>
>>> XDG_RUNTIME_DIR=/run/user/1000
>>> XDG_SEAT=seat0
>>> XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
>>> XDG_SESSION_CLASS=user
>>> XDG_SESSION_DESKTOP=mate
>>> XDG_SESSION_ID=c2
>>> XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
>>> XDG_SESSION_TYPE=x11
>>> XDG_VTNR=7
>>>
>>

References:
SpinBox with PopupMenuCD <claude.dessere@xxxxxxxxx>
Re: SpinBox with PopupMenuBruce Steers <bsteers4@xxxxxxxxx>
Re: SpinBox with PopupMenuBruce Steers <bsteers4@xxxxxxxxx>