Function InputWindow()

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3214
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 222 times
Been thanked: 123 times
Contact:

Function InputWindow()

Post by mol » Wed Aug 26, 2009 12:22 pm

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
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Tue Dec 23, 2014 11:58 pm

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 3368 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: 218
Joined: Tue May 19, 2009 7:10 am
Been thanked: 9 times

Post by jayadevu » Wed Dec 24, 2014 2:23 am

Hi Pablo,

Very nice implementation. Thanks for sharing.

Warm regards,

Jayadev

User avatar
Steed
Posts: 385
Joined: Sat Dec 12, 2009 3:40 pm
Has thanked: 1 time
Been thanked: 2 times

Post by Steed » Wed Dec 24, 2014 5:25 am

Thanks

User avatar
mol
Posts: 3214
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 222 times
Been thanked: 123 times
Contact:

Post by mol » Wed Dec 24, 2014 7:08 am

Many thanks for your kind work!

User avatar
bpd2000
Posts: 1077
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 96 times

Post by bpd2000 » Wed Dec 24, 2014 8:37 am

mol wrote:Many thanks for your kind work!
+1
BPD
Convert Dream into Reality through HMG

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 146 times
Contact:

Post by srvet_claudio » Wed Dec 24, 2014 2:43 pm

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
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Wed Dec 24, 2014 3:14 pm

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: 2331
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 573 times
Been thanked: 124 times
Contact:

Post by serge_girard » Thu Dec 25, 2014 8:22 am

Thank you all!

Serge

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Sat Dec 27, 2014 2:06 am

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 3212 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