Function InputWindow()

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Function InputWindow()

Post by Pablo César » Sun Dec 28, 2014 1:06 pm

Was funny, yesterday night (almost around midnight, we were tired) and did not see this mistake... :lol:

The incridible, that I have check both (enable/disable) but I had not see that was inverted... :lol:

To use StopControlEventProcedure() is ok for me and it is working perfectly !! :D

I will still use Empty for numeric check but with different message. Because in case we do not want this checking/message, it's just not to include in SetMethodCode() at xTestCode().

And I will take off hb_IdleSleep( 0.8 ) because there is no more reason to keep it. MessageBoxTimeout took place in that ! :D

It was very good, really good !

Many thanks, Claudio !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Sun Dec 28, 2014 7:36 pm

After Angel suggestions and Claudio's instructions about MessageBoxTimeout I made some litle improvements:
Screen4.png
Screen4.png (100.99 KiB) Viewed 1556 times
1. At UFD at xIfEmpty() which is responsable for controls checking/settings. It was added MessageBoxTimeout to display a message saying that no field must be empty/zero or without option (these are just examples).

2. In that verifications, was inserted a Ctrl-Z for TEXT and EDIT cases to UNDO what the text was previously.

3. BackColor in InputWindow is posible to be defined as optional.

4. Add and fixed ENTER events (except for CheckBox)

<Code source files were removed because there is a updated version ahead of this topic>

I hope be enjoyed ! :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
apais
Posts: 309
Joined: Fri Aug 01, 2008 6:03 pm
Location: uruguay
Has thanked: 50 times
Been thanked: 28 times
Contact:

Post by apais » Sun Dec 28, 2014 11:10 pm

Cool !
I'll test it ASAP
This a key black box routine for my programs.

Angel

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Sun Dec 28, 2014 11:58 pm

Thanks Angel !

Good to know it will be useful ! :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Mon Dec 29, 2014 11:57 pm

Grid control was incorporated. It's for simple use, Grid is a complex control ans support only for arrays.

CheckBox was not posible to detect ENTER event. Claudio made an indication by CREATE EVENT.
Even with this resource, was not satisfactory, probably I do not know to implement. The main idea of this InputWindow is to make a generic function (as black-box) and I added this event in My_UDF.

InputWindow was split in separated module with the important functions concerned.

The most considered and the biggest gain was widths in the all controls is allowed for pre-definition. But it works with fixed controls widths. The difference is on xControlWidth as will be defined, could be as fixed size of width or chooso to make in array with each element for each control. This resource with array, lets look better, more aesthetic.

Added a new button for test and comparasion.
Screen4.png
Screen4.png (216.49 KiB) Viewed 1485 times
<Code source files were removed because there is a updated version ahead of this topic>

Enjoy it ! :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
bpd2000
Posts: 1078
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 96 times

Post by bpd2000 » Tue Dec 30, 2014 4:27 am

Very good extension
Thank you Pablo César
BPD
Convert Dream into Reality through HMG


User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Tue Dec 30, 2014 10:10 am

Thank you guys !

I'm happy you have enjoyed ! :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
luisvasquezcl
Posts: 1140
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 14 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Tue Dec 30, 2014 8:02 pm

Excelente aporte y muy útil, muchas gracias
saludos cordiales,
Luis Vásquez

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Tue Dec 30, 2014 8:08 pm

Gracias, Luis.

Que bueno que te haya gustado ! Espero que sea de gran utilidad ! :D

Un abrazo,
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Post Reply