Page 1 of 12

Function InputWindow()

Posted: Wed Aug 26, 2009 12:22 pm
by mol
I have suggestion for InputWindow function

1. Link ESC key to "Cancel" button
2. Internationalize "Cancel" button - caption of this button should depend from selected language.

Marek "MOL"

function InputWindow()

Posted: Tue Dec 23, 2014 11:58 pm
by Pablo César
mol wrote:I have suggestion for InputWindow function

1. Link ESC key to "Cancel" button
2. Internationalize "Cancel" button - caption of this button should depend from selected language.

Marek "MOL"
I also think so ! :D

I think many few colleagues know about this resource of HMG.

I made some improvements in InputWindow and I made as UDF (InputWindow2) but if HMG Development Team considere good to be included at HMG library (by replacing) for next release, please do not hesite to do it.
Screen1.png
Screen1.png (1.14 MiB) Viewed 6400 times
The improvements are:

- Default values, optimazing getting more clean code
- Add ToolTips for each controls
- Allowing HotKey definitions
- Internalization in Buttons Ok / Cancel

One example I prepared, here is in Polish, but could be changed for any language supported by HMG, like as:

Turkish, Czech, Croatian, Basque, English, French, German, Italian, Polish, Portuguese, Russian, Spanish, Finnish, Dutch and Slovenian

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

Added implementation are absolutly optional. It's total full backward compatibility.

I made this because I found relevant to be improved when I was looking at HMG library for easy and simple edition.

I hope you enjoy !

:D

Re: function InputWindow()

Posted: Wed Dec 24, 2014 2:23 am
by jayadevu
Hi Pablo,

Very nice implementation. Thanks for sharing.

Warm regards,

Jayadev

Re: function InputWindow()

Posted: Wed Dec 24, 2014 5:25 am
by Steed
Thanks

Re: function InputWindow()

Posted: Wed Dec 24, 2014 7:08 am
by mol
Many thanks for your kind work!

Re: function InputWindow()

Posted: Wed Dec 24, 2014 8:37 am
by bpd2000
mol wrote:Many thanks for your kind work!
+1

Re: function InputWindow()

Posted: Wed Dec 24, 2014 2:43 pm
by srvet_claudio
Very Nice !!!

Re: function InputWindow()

Posted: Wed Dec 24, 2014 3:14 pm
by Pablo César
Thank you guys !

Re: function InputWindow()

Posted: Thu Dec 25, 2014 8:22 am
by serge_girard
Thank you all!

Serge

Function InputWindow()

Posted: Sat Dec 27, 2014 2:06 am
by Pablo César
Hi all !

Encouraged by my colleagues and the common need, I'm making a utility to check and allow re-edited versions and patch number for each HMG version installation, which it will make easy to display and correct HMG versions.
Screen1.png
Screen1.png (246.48 KiB) Viewed 6242 times
As I was preparing this application (which is not finished yet), I came across the inputwindow needed to further improves.

I based on Grigory Filatov examples and now new version of InputWindow2 is ready to be replaced the previous one.

Changelog

* Enhanced:
  1.   
  2. Defaults values for not defined variables/arrays, avoiding runtime errors.
      
  3. Check inconsistencies variables / arrays
      
  4. Controls definition using more resources like: bold, tooltips, font color, width, alignment and future demands by calling functions directly.
      
  5. Buttons are internalizated, according InitMessages(cSetLang)
* New:
  
  1. Allow numeric TextBox for integers.
      
  2. nRow and nCol parameters allow to fix window position. When any of one of it is missing or with zero value, it will be centralized (horizontaly or/and verticaly).
      
  3. aStyles allows as bidimentional array ({{},{}}) to inform:
    •     
    • nLabelWidth and nControlWidth parameters allow to fix widths of labels and Controls. When not informed defaults value is assumed (90 and 140 respectively).
          
    • aLabelFColor Font color for labels can be setted. For some controls, font and back colors are not posible due a limitation of own control.
          
    • lLabelBold and lControlBold, bold for label and control are allowed.
          
    • nAlign is used for labels to be aligned: Left, Center or Right
      
  4. bCode is used to add codeblocks. Functions can be nested.
      
  5. Example demostrating how can be used control's events (gotfocus, lostfocus, change, enter) and SetProperties in UDF. Sample of new resource of grid header colors.
<Code source was removed because there is a updated version ahead of this topic>

All new and improved implementations are absolutly optional. It's totally full for retro-compatibility usage.


I hope you can enjoy it ! :D