Page 6 of 12

Function InputWindow()

Posted: Sun Feb 08, 2015 2:02 am
by Pablo César
In Grid ColumnControls, we have following options:
  1. { 'CHECKBOX' }
  2. { 'CHECKBOX', 'Yes', 'No' }
  3. { 'COMBOBOX', {"Opt 1","Opt 2"} }
  4. { 'DATEPICKER', 'DROPDOWN' }
  5. { 'EDITBOX' }
  6. { 'SPINNER', 1, 20 }
  7. { 'TEXTBOX','CHARACTER' }
  8. { 'TEXTBOX','DATE' }
  9. { 'TEXTBOX','NUMERIC','99999999' }
  10. { 'TIMEPICKER', _TIMELONG24H / _TIMESHORT24H / _TIMELONG12H / _TIMESHORT12H }
Please let me know if I'm forgewtting any one.

I'm thinking to add more two controls at InputWindow() just to be compatible with Grid's ColumnControls:
[tr][td]Control to be created[/td][td]aInitValues[/b][/td][td]   [/td][td]aFormats[/b][/td][/tr]
[tr][td]Label[/td][td]""[/td][td][/td][td]Nil[/td][/tr]
[tr][td]TextBox "C"[/td][td]""[/td][td][/td][td]>= 32[/td][/tr]
[tr][td]TextBox "C" (PassWord)[/td][td]""[/td][td][/td][td]"PASSWORD"[/td][/tr]
[tr][td]TextBox "N" (New)[/td][td]9[/td][td][/td][td]9[/td][/tr]
[tr][td]TextBox "N"(INPUTMASK)[/td][td]9[/td][td][/td][td]Ex: "99.99"[/td][/tr]
[tr][td]ComboBox[/td][td]9[/td][td][/td][td]{}[/td][/tr]
[tr][td]TimePicker[/td][td]""[/td][td][/td][td]{_TIMELONG24H / _TIMESHORT24H / _TIMELONG12H / _TIMESHORT12H}[/td][/tr]
[tr][td]Spinner[/td][td]Ex: {1,20}[/td][td][/td][td]9[/td][/tr]
[tr][td]CheckBox[/td][td].T. or .F.[/td][td][/td][td][/td][/tr]
[tr][td]DatePicker[/td][td]CtoD() or Date()[/td][td][/td][td][/td][/tr]
[tr][td]EditBox[/td][td]""[/td][td][/td][td]> 32[/td][/tr]
[tr][td]EditBox[/td][td]Dbf Memo field[/td][td][/td][td][/td][/tr]
[tr][td]Grid[/td][td]{{}}[/td][td][/td][td]{{headers},{Widths}}[/td][/tr][/table]
I know in Spinner aInitValues and aFormats it's a little bit strange, but is the only combination available.

Function InputWindow()

Posted: Sun Feb 08, 2015 11:34 pm
by Pablo César
New controls added TimePicker and Spinner already !
Screen1.png
Screen1.png (1.17 MiB) Viewed 4809 times
Spinners it will work with INCREMENT option.

Sources files and demo will be delivered with InputWindow2() upto an official version be released.

<Source code of DEMO5 was removed because there is a updated version ahead of this topic>

I hope you enjoyed ! :D

Re: Function InputWindow()

Posted: Mon Feb 09, 2015 12:24 am
by Javier Tovar
Bien Pablo, Buen trabajo!

Saludos

Function InputWindow()

Posted: Mon Feb 09, 2015 12:31 am
by Pablo César
Gracias Javier por acompañar ! :D

Re: Function InputWindow()

Posted: Mon Feb 09, 2015 4:32 am
by bpd2000
err.PNG
err.PNG (17.42 KiB) Viewed 4781 times
Hi
verify error

Function InputWindow()

Posted: Mon Feb 09, 2015 9:21 pm
by Pablo César
Thank you Dave to test and announce the runtime error.

The dificulty it was at TimePicker when aFormats parameter is passed as array.
Array + String was the available way. I know there is not need to be an array to pass hour type.
But it was the posible way to differentiated with the pre-existed items (other controls) in InputWindow();

So now I transform from array to string and is okay now.

Function InputWindow()

Posted: Tue Mar 03, 2015 7:15 pm
by Pablo César
InputWindow is quite finnishing to edit Grid's records. I'm testing in several situations before release it.

One case is heating my head thinking case like as in C:\hmg.3.4.0\SAMPLES\Controls\Grid\GRID_03 demo.
The first column is with size equal to zero. Normally I have defined for this case like as default value for control widths.
An I wish to share with you to compose a common sense what to do in this cases.
I thought at begining to show (let's say TextBox) but be enabled=.F., but this definition I have already counted in ColumnWhen.
Then I ask to myself: What's finality of hiden column in Grids ?
To process something but can not edit, right ?
But also we do not wish to be displayed.
So I thought to define this column with hiden control, but it will take empty space on the screen.

See picture below to have an idea:
Screen1.png
Screen1.png (17.19 KiB) Viewed 4639 times
In this case label is empty and size was forced to default width.

What do you suggest ? Any ideas ?

Re: Function InputWindow()

Posted: Tue Mar 03, 2015 8:40 pm
by Javier Tovar
Hola Pablo César!

Yo sugiero que no aparezca en el InputWindows la columna 1, ya que por alguna razón se oculto!

Saludos

Function InputWindow()

Posted: Tue Mar 03, 2015 8:42 pm
by Pablo César
Tenés razón Javier ! Lo voy hacer asi. Voy a cargarlo y ocultarlo. Es decir el control podrá contener algun valor que puede ser útil para ser procesado, pero al control lo voy a esconder.

Gracias Javier por tu interés y respuesta.

Un gran abrazo

Re: Function InputWindow()

Posted: Tue Mar 03, 2015 9:29 pm
by srvet_claudio
Pablo César wrote:InputWindow is quite finnishing to edit Grid's records. I'm testing in several situations before release it.

One case is heating my head thinking case like as in C:\hmg.3.4.0\SAMPLES\Controls\Grid\GRID_03 demo.
The first column is with size equal to zero. Normally I have defined for this case like as default value for control widths.
An I wish to share with you to compose a common sense what to do in this cases.
I thought at begining to show (let's say TextBox) but be enabled=.F., but this definition I have already counted in ColumnWhen.
Then I ask to myself: What's finality of hiden column in Grids ?
To process something but can not edit, right ?
But also we do not wish to be displayed.
So I thought to define this column with hiden control, but it will take empty space on the screen.

See picture below to have an idea:
Screen1.png
In this case label is empty and size was forced to default width.

What do you suggest ? Any ideas ?
This is a defect in the implementation of GRID that I left it to maintain compatibility with older versions.
In old versions when displays images in the grid control the first column is used for display it and only in this column.

The correct way is display the image in the side of text in any column and not in a separate column.

Code: Select all

- <ParentWindowName>.<GridControlName>.Image ( lTransparent ) := { "image1.png", "image2.bmp", ... }
- <ParentWindowName>.<GridControlName>.ImageIndex ( nRow , nCol ) [ := | -->] nIndex