[Gambas-user] Decimal values on a SpinBox

Fabien Bodard gambas.fr at gmail.com
Mon Dec 2 14:11:28 CET 2019


Try with that :-)
There was a lock if step was <1

when you write the value in the property panel remember you must use
local decimal separator (ex: "," for me)

Le lun. 2 déc. 2019 à 14:03, Gianluigi <bagonergi at gmail.com> a écrit :
>
> I don't know if you will see this warning, but if you look at the spam, there should be an answer of mine with an attachment.
> See here:
> https://lists.gambas-basic.org/pipermail/user/2019-December/068207.html
>
> Il giorno lun 2 dic 2019 alle ore 13:02 Luis Louro <lapisdecor at gmail.com> ha scritto:
>>
>> Hi Fabien, nice to meet you.
>> What do you mean by multiple of the gap? Can you give me an example? I was trying a 0.10 step for min 0 and max 100 but no sucess.
>>
>> Luis Louro
>>
>> Fabien Bodard <gambas.fr at gmail.com> escreveu no dia segunda, 2/12/2019 à(s) 10:10:
>>>
>>> Humm... no :-)... a spinbox is definitively integer.
>>>
>>> So ... this is the float version :-)
>>>
>>> Well it's a no tested class with many display bugs but it seem to do
>>> the job well. Just make sure that the step is a multiple of the gap
>>> between the min and max value.
>>>
>>> Put this class in your project, it's a gambas widget that act like one
>>> from a component. Just do a compile all and it will appear in the
>>> toolbox.
>>>
>>>
>>>
>>>
>>>
>>>
>>> Le lun. 2 déc. 2019 à 08:09, Luis Louro <lapisdecor at gmail.com> a écrit :
>>> >
>>> > Hi.
>>> >
>>> > How need a spinbox with values like 2.85 but the step is only Integer values. Is there a way to define a decimal step?
>>> >
>>> > Thanks
>>> >
>>> > Luis Louro
>>> >
>>> > --
>>> > AVISO DE CONFIDENCIALIDADE: Esta mensagem, assim como os ficheiros
>>> > eventualmente anexos, é confidencial e reservada apenas ao conhecimento
>>> > da(s) pessoa(s) nela indicada(s) como destinatária(s). Se não é o seu
>>> > destinatário, solicitamos que não faça qualquer uso do respectivo conteúdo
>>> > e proceda à sua destruição, notificando o remetente.
>>> >
>>> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>>
>>>
>>>
>>> --
>>> Fabien Bodard
>>>
>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>>
>>
>> --
>> AVISO DE CONFIDENCIALIDADE: Esta mensagem, assim como os ficheiros
>> eventualmente anexos, é confidencial e reservada apenas ao conhecimento
>> da(s) pessoa(s) nela indicada(s) como destinatária(s). Se não é o seu
>> destinatário, solicitamos que não faça qualquer uso do respectivo conteúdo
>> e proceda à sua destruição, notificando o remetente.
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----



-- 
Fabien Bodard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FloatSpinbox.class
Type: application/java-vm
Size: 9703 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191202/767b10d0/attachment.class>


More information about the User mailing list