Function InputWindow()

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Function InputWindow()

Post by Javier Tovar »

Hola Pablo Cesar!, Excelente!!!

Mi opinión es que no existan esos espacios vacíos!, que solo aparezcan 1,4,5,y 6.

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

Function InputWindow()

Post by Pablo César »

Yes Javier but sometimes it could be useful to get, define and hide the control with columnwidth as 0 when be needed to process. Most of times, this columns have some data, code or any kind of information but we don't want to be displayed but... we need to use this data in this hiden field for processing something. Some logical compose most probably could it be strapped to attend one or more fields which are displayed.

For Columns widths whe zero, everybody knows that do not need to be displayed. This is clear for me but...
The question is how to do with it ?

I think the best way to take is:
  1. Take data from this column
  2. Define as control but need be hiden
  3. This control it will be hiden but other control will superimpose it. Other control taking the same position. Other control will be over positioned the hiden one.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Function InputWindow()

Post by Rathinagiri »

IMHO, the data of hidden controls can be stored in a variable (aReturn) and returned back as such. No requirement of defining and hiding the controls.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Function InputWindow()

Post by srvet_claudio »

Rathinagiri wrote:IMHO, the data of hidden controls can be stored in a variable (aReturn) and returned back as such. No requirement of defining and hiding the controls.
+1
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Function InputWindow()

Post by Javier Tovar »

+1
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Function InputWindow()

Post by Pablo César »

Rathinagiri wrote:IMHO, the data of hidden controls can be stored in a variable (aReturn) and returned back as such. No requirement of defining and hiding the controls.
In all these days, I made tests and I have reviewed your proposal which I supposed to be a good alternative.

But before we decide something, let me explain some important points, around hidden controls.

I'm working basically with tree situations to grids editing and when be hiden or need to be hiden:
  1. When Column Widths is equal to 0 (zero). This can it be one or could be more than one column. this we have to take in count.
  2. When Grids is using images at first column. Which is needing to keep retrocompatibility. And also its column width mosthly is not with 0 (zero) value. You can start defining with 0 (zero) but it will depends for image width and listview will make an automatical width column adjustment (this is internal behaviour).
  3. When Grids uses the new way of images or checkboxes at column as index. This sub-itens are not displayed but really exists. Images probably will not needed to be displayed at InputWindow but the unique CheckBox should be displayed.
Hiding controls, IMHO will give more effective access to users when it be accessed by UDF because InputWindow can be execute specific user procedures, like changing colors/fonts, like enable/disabling controls, actioning other methods like: LOSTFOCUS, GOTFOCUS and ENTER for example. And making events in specific control too. It's very powerful to count with UDF in InputWindow, only depends from developer's creativity. I do not discount the possibility that the programmer need to apply any conditions in editing through these hidden columns. Therefore, this information should be easily accessible.
Screen2.png
Screen2.png (39.25 KiB) Viewed 5118 times
There is also to be considered _InputWindowOk() after user confirmation at exit of InputWindow and it shall take all listed and by scanning controls. This procedure, will returns an array and if we add a new array (aReturn as you indicated), will be necessary to compose from two arrays to only one as return. So in this way, will be necessary to include in your aReturn an element position for the new array.
Let's say for example aReturn:={{<nPos>,<xValue>},{<nPos>,<xValue>}}

Following this think, will be dificult to work with column index and it properties according columns' grids. Will be very hard to exempt columns when be not required to be displayed.

Keeping this hiden data in hidden controls, will be easier, very practical when it be required for UDF processing and also will not requires a final array composite.

I suggest for keepping hidden column in hidden controls but not occupying any space for aesthetic reasons.

See my suggestion in images:
Screen3.png
Screen3.png (23.27 KiB) Viewed 5113 times
That's incridible how Grids are so complex control. Can I go ahead with my thinking or have you ane better idea ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Function InputWindow()

Post by Rathinagiri »

Of late, I too have re-considered my idea and thought that it will further complicate the things.

I think the first option (hidden and not occupying) would be good. Those controls might not be visible.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Function InputWindow()

Post by Pablo César »

Thank you for your understanding Rathi and your quick response.

I think very good exchange ideas, especially when we do not feel firmly in what we thought good.
So I think very healthy publish to share ideas and improve them whenever possible.

Thanks for the support from all of you.
Will be open to new suggestions. :P

Taking the opportunity, I would like to inform all of you that I'm working to let functional and portable to future changes.

Replacing all code where I used: _DefineDatePick, _DefineMaskedTextbox, _DefineCombo, _DefineHotKey, Etc. for currents precompile directives, eg. DEFINE LABEL, etc.

This reconditioning, will facilitate the future better understanding of the code and will enable future changes in implementations that may occur with the controls in HMG.

I'm following the recommendation of our worthy friend Claudio to keep this portability.

And so I think it is important to mention it so that we will all follow this pattern.

Once again I thank everyone for their contributions in this way we can all the best of us. :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Function InputWindow()

Post by Javier Tovar »

Hola Pablo César,

Voto por la Primera Opción!

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

Function InputWindow()

Post by Pablo César »

Gracias Javier por tu interés y opinion.

Muchas veces tenemos que ejemplificar con imagenes para hacerse entender mejor.
Que bueno que se entendió lo pretendido. :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply