Input decimal number with sign and specific incremental deci

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Input decimal number with sign and specific incremental deci

Post by Italia1 »

Salve a tutti!
Prima faccio i complimenti ai grandi Roberto Lopez, S. Rathinagiri ed a tutti gli altri che hanno contribuito a fare questo bel compilatore!

Vorrei sapere se è possibile fare un input di un numero decimale che abbia questi requisiti:
1) non può essere minore di -5.00
2) non può essere maggiore di +5.00 (magari anche con il segno +)
3) può avere solamente valori con un incremento di 0.25

Sarebbe perfetto uno SPINNER, ma RANGEMIN non può essere negativo (da 0 a 65535) e INCREMENT non può essere decimale.

Esempio (non valido)
@ <nRow> ,<nCol> SPINNER Spinner_1 RANGE -5 , +5 INCREMENT 0.25

Potrei fare un controllo su un NUMERIC TEXTBOX, ma sarebbe bello avere un controllo che faccia questo lavoro.
E' possibile in HMG 3.2(Stable) avere questa funzionalità?
Grazie comunque. W il vecchio Clipper e il nuovo HMG!

---------- english translate
Hello to everyone!
First i congratulate with greats Roberto Lopez, S. Rathinagiri and all others who helped to make this beautiful compiler!

I would like to know if it's possible to make an input a decimal number that has these requirements:
1) can not be less than -5.00
2) can not be greater than +5.00 (perhaps also with the + sign)
3) can only have values ??with an increase of 0.25

SPINNER one would be perfect, but RangeMin can not be negative (0 to 65535) and INCREMENT can not be decimal.

Example (invalid)
@ <nRow> ,<nCol> SPINNER Spinner_1 RANGE -5 , +5 INCREMENT 0.25

I could do a check on a NUMERIC TEXTBOX, but it would be nice to have a control that makes this work.
It's possible in HMG 3.2 (Stable) have this feature?

Thanks anyway. W old Clipper and the new HMG!
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Input decimal number with sign and specific incremental deci

Post by Pablo César »

Hi you from Italy, have you be very good wellcome to the HMG forum !

I regret to inform to you (in my opinion), but the SPINNER (in HMG and MiniGui Ext) does not work with decimals... :oops:

Like this: http://www.codeproject.com/Articles/625 ... rt-Spinner

http://msdn.microsoft.com/en-us/library ... s.85).aspx (UI_PKEY_DecimalValue)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Re: Input decimal number with sign and specific incremental

Post by Italia1 »

Thanks for welcome Pablo César!
I'm sure that SPINNER does not work with decimals and negative value, I write it before (red error) :( . I would like to find another method, if exist.

I see the code in the link, and after post result. Thanks!

Have a nice HMG!
Last edited by Italia1 on Mon Mar 24, 2014 8:30 pm, edited 1 time in total.
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Input decimal number with sign and specific incremental

Post by Javier Tovar »

Bienvenido Italia 1 al HMG Forum :D

Saludos desde México :D :D :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Input decimal number with sign and specific incremental

Post by Pablo César »

Italia1 wrote:I'm sure that SPINNER does not work with decimals and negative value, I write it before (red error)
But It works well with negative values...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Re: Input decimal number with sign and specific incremental

Post by Italia1 »

Pablo César wrote:
Italia1 wrote:I'm sure that SPINNER does not work with decimals and negative value, I write it before (red error)
But It works well with negative values...
:o But in documentation - http://hmgforum.com/hmgdoc/data/spinner.htm
Hints:
- The minimum value in the range can be from 0 to 65,535. Likewise, the maximum value can be from 0 to 65,535
I have 3.2 HMG: there's another version? Sorry if I say an error. :oops:

Thanks for Bienvenido Javier Tovar: Saluti dall'Italia a te e a tutti gli utenti dell'HMG forum!

Have a nice HMG!
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Input decimal number with sign and specific incremental

Post by danielmaximiliano »

Bienvenido Italia 1

saludos desde Buenos Aires Argentina.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Input decimal number with sign and specific incremental

Post by Javier Tovar »

Jajaja hice mi Spinner personal, :D

Saludos
MiSpinner.rar
(843.83 KiB) Downloaded 224 times
Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Re: Input decimal number with sign and specific incremental

Post by Italia1 »

Javier Tovar wrote:Jajaja hice mi Spinner personal, :D
Mitic simul-Spinner :D
It's a good alternative! Thanks great Javier Tovar!
I think there's not another base Control that make this good alternative.

Thanks for saludos danielmaximiliano. I'm very :oops:
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Input decimal number with sign and specific incremental

Post by danielmaximiliano »

Hola a Todos :
el control Spinner según Microsoft

Translate Google
Hi Everyone:
Spinner control as Microsoft
http://msdn.microsoft.com/en-us/library ... spx#values
Values

Define the top button to increase the value by one unit and the bottom button to decrease by one unit. Typically, the unit is one, but it should be the smallest common change in value. Ideally, the spin control should cover all valid values, and it should be more convenient than typing in the text.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply