Page 3 of 12

Function InputWindow()

Posted: Sun Dec 28, 2014 1:06 pm
by Pablo César
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 !

Function InputWindow()

Posted: Sun Dec 28, 2014 7:36 pm
by Pablo César
After Angel suggestions and Claudio's instructions about MessageBoxTimeout I made some litle improvements:
Screen4.png
Screen4.png (100.99 KiB) Viewed 4323 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 ! :)

Re: Function InputWindow()

Posted: Sun Dec 28, 2014 11:10 pm
by apais
Cool !
I'll test it ASAP
This a key black box routine for my programs.

Angel

Function InputWindow()

Posted: Sun Dec 28, 2014 11:58 pm
by Pablo César
Thanks Angel !

Good to know it will be useful ! :)

Function InputWindow()

Posted: Mon Dec 29, 2014 11:57 pm
by Pablo César
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 4252 times
<Code source files were removed because there is a updated version ahead of this topic>

Enjoy it ! :D

Re: Function InputWindow()

Posted: Tue Dec 30, 2014 4:27 am
by bpd2000
Very good extension
Thank you Pablo César

Re: Function InputWindow()

Posted: Tue Dec 30, 2014 7:19 am
by mol
Very fine!

Function InputWindow()

Posted: Tue Dec 30, 2014 10:10 am
by Pablo César
Thank you guys !

I'm happy you have enjoyed ! :D

Re: Function InputWindow()

Posted: Tue Dec 30, 2014 8:02 pm
by luisvasquezcl
Excelente aporte y muy útil, muchas gracias
saludos cordiales,
Luis Vásquez

Re: Function InputWindow()

Posted: Tue Dec 30, 2014 8:08 pm
by Pablo César
Gracias, Luis.

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

Un abrazo,