[Gambas-bugtracker] Bug #2763: Spinbox disabled when setting Readonly to True - and others

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Thu Jun 29 18:51:00 CEST 2023


Comment #3 by Claus DIETRICH:

Hi Benoít

To be more specific I took the SpinBox class source code in a test app and modified it as follows to meet my expectations:

In Private Sub ChangeValue (...) I disabled the disabling of value increment resp decrement at ReadOnly=True

  'If $hTextBox.ReadOnly Then Return

In Private Sub SetValue (...) I disabled the selection of all Text (makes no sense when ReadOnly=True):

  If bFocus Then

In Private Sub UpdateButtons() I disabled the lines which disable the buttons when ReadOnly=True:

  '$hButtonInc.Enabled = Not Me.ReadOnly
  '$hButtonDec.Enabled = Not Me.ReadOnly

I couldn't yet figure out a way to fix the position of the value inside the border (when the alignment is set to normal or left).

Best regards

More information about the Bugtracker mailing list