DEFAULT ICON (for example using inputbox)
Moderator: Rathinagiri
DEFAULT ICON (for example using inputbox)
I use the latest HMG build and also HMGMiniGui.
When i use for example the function inputbox it uses the default icon. There is no parameter to change the icon or disable the sysmenu (left corner).
In MiniGui i can use
SET DEFAULT ICON TO <cIconName>
The inputbox now also uses this default icon. In HMG i cannot find the 'SET DEFAULT ICON TO' option. Is there another way of changing this behavior ?
When i use for example the function inputbox it uses the default icon. There is no parameter to change the icon or disable the sysmenu (left corner).
In MiniGui i can use
SET DEFAULT ICON TO <cIconName>
The inputbox now also uses this default icon. In HMG i cannot find the 'SET DEFAULT ICON TO' option. Is there another way of changing this behavior ?
Re: DEFAULT ICON (for example using inputbox)
Hi,trmpluym wrote:I use the latest HMG build and also HMGMiniGui.
In HMG i cannot find the 'SET DEFAULT ICON TO' option. Is there another way of changing this behavior ?
You are right! SET DEFAULT ICON TO option is available in HMG Extended Edition only.
There is not the above feature in HMG Official.
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: DEFAULT ICON (for example using inputbox)
Dear Gfilatovgfilatov wrote: You are right! SET DEFAULT ICON TO option is available in HMG Extended Edition only.
There is not the above feature in HMG Official.
Can you give hint how to adopt said command in HMG
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: DEFAULT ICON (for example using inputbox)
Hi,bpd2000 wrote: Can you give hint how to adopt said command in HMG
It is a simple modification.
I've added a new public variable _HMG_DefaultIconName := Nil at Minigui initialization.
Then added the following code in the function _DefineWindow():
Code: Select all
IF ValType ( icon ) == 'U' .AND. ValType ( _HMG_DefaultIconName ) != 'U'
icon := _HMG_DefaultIconName
ENDIF
...
BrushHandle := RegisterWindow( icon, FormName, aRGB )
Code: Select all
#command SET DEFAULT ICON TO <iconname> ;
=>;
_HMG_DefaultIconName := <iconname>
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: DEFAULT ICON (for example using inputbox)
Excellent, Thank you Mr. Gfilatovgfilatov wrote:Hi,bpd2000 wrote: Can you give hint how to adopt said command in HMG
It is a simple modification.
I've added a new public variable _HMG_DefaultIconName := Nil at Minigui initialization.
Then added the following code in the function _DefineWindow():After that I've created this command in an include file i_window.ch:Code: Select all
IF ValType ( icon ) == 'U' .AND. ValType ( _HMG_DefaultIconName ) != 'U' icon := _HMG_DefaultIconName ENDIF ... BrushHandle := RegisterWindow( icon, FormName, aRGB )
That's allCode: Select all
#command SET DEFAULT ICON TO <iconname> ; =>; _HMG_DefaultIconName := <iconname>
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- Clip2Mania
- Posts: 99
- Joined: Fri Jun 13, 2014 7:16 am
- Location: Belgium
Re: DEFAULT ICON (for example using inputbox)
Just for my understanding:
Thanks for clarifying!
In what file is that? In your own program?I've added a new public variable _HMG_DefaultIconName := Nil at Minigui initialization.
That's in h_windows.prg, right ?Then added the following code in the function _DefineWindow():
Thanks for clarifying!
Re: DEFAULT ICON (for example using inputbox)
Hi,Clip2Mania wrote:Just for my understanding:In what file is that? In your own program?I've added a new public variable _HMG_DefaultIconName := Nil at Minigui initialization.
That's in h_windows.prg, right ?Then added the following code in the function _DefineWindow():
Thanks for clarifying!
Thanks for your interest!
1) look at your source\h_init.prg
2) the functions _DefineWindow() and _DefineModalWindow() are placed in source\h_windows.prg
Good luck!
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Clip2Mania
- Posts: 99
- Joined: Fri Jun 13, 2014 7:16 am
- Location: Belgium
Re: DEFAULT ICON (for example using inputbox)
Thanks very much!
Erik
Erik
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: DEFAULT ICON (for example using inputbox)
Done.gfilatov wrote:Hi,bpd2000 wrote: Can you give hint how to adopt said command in HMG
It is a simple modification.
I've added a new public variable _HMG_DefaultIconName := Nil at Minigui initialization.
Then added the following code in the function _DefineWindow():After that I've created this command in an include file i_window.ch:Code: Select all
IF ValType ( icon ) == 'U' .AND. ValType ( _HMG_DefaultIconName ) != 'U' icon := _HMG_DefaultIconName ENDIF ... BrushHandle := RegisterWindow( icon, FormName, aRGB )
That's allCode: Select all
#command SET DEFAULT ICON TO <iconname> ; =>; _HMG_DefaultIconName := <iconname>
Many thanks Grigory !!!
Re: DEFAULT ICON (for example using inputbox)
Wow ! In one day this feature is implemented. Thanks !
Is this change part of the next release ?
Many thanks again!
Is this change part of the next release ?
Many thanks again!