Function InputWindow()
Moderator: Rathinagiri
Function InputWindow()
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"
1. Link ESC key to "Cancel" button
2. Internationalize "Cancel" button - caption of this button should depend from selected language.
Marek "MOL"
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
function InputWindow()
I also think so !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 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.
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 !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: function InputWindow()
Hi Pablo,
Very nice implementation. Thanks for sharing.
Warm regards,
Jayadev
Very nice implementation. Thanks for sharing.
Warm regards,
Jayadev
Re: function InputWindow()
+1mol wrote:Many thanks for your kind work!
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: function InputWindow()
Very Nice !!!
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: function InputWindow()
Thank you guys !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Function InputWindow()
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.
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:
All new and improved implementations are absolutly optional. It's totally full for retro-compatibility usage.
I hope you can enjoy it !
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.
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:
- Defaults values for not defined variables/arrays, avoiding runtime errors.
- Check inconsistencies variables / arrays
- Controls definition using more resources like: bold, tooltips, font color, width, alignment and future demands by calling functions directly.
- Buttons are internalizated, according InitMessages(cSetLang)
- Allow numeric TextBox for integers.
- 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).
- 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
- bCode is used to add codeblocks. Functions can be nested.
- 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.
All new and improved implementations are absolutly optional. It's totally full for retro-compatibility usage.
I hope you can enjoy it !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein