Function InputWindow()

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Function InputWindow()

Post 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"
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 »

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 6398 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
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
jayadevu
Posts: 238
Joined: Tue May 19, 2009 7:10 am

Re: function InputWindow()

Post by jayadevu »

Hi Pablo,

Very nice implementation. Thanks for sharing.

Warm regards,

Jayadev
User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: function InputWindow()

Post by Steed »

Thanks
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: function InputWindow()

Post by bpd2000 »

mol wrote:Many thanks for your kind work!
+1
BPD
Convert Dream into Reality through HMG
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: function InputWindow()

Post by srvet_claudio »

Very Nice !!!
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: function InputWindow()

Post by Pablo César »

Thank you guys !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: function InputWindow()

Post by serge_girard »

Thank you all!

Serge
There's nothing you can do that can't be done...
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 »

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 6240 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
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply