Change Size Menuitem im hmg.4

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Change Size Menuitem im hmg.4

Post by Pablo César »

Someone could answer my question please...
Pablo César wrote:Taking this chance to ask:

In HMG 3 is this possible to do ?
Upto now no body answer my question... snif snif ... :(
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Change Size Menuitem im hmg.4

Post by l3whmg »

Hi Pablo.
I'm not sure and I don't remember well (in the last months I only used - concentrated on - HMG4) but I think it's not possible. On the other hand, you can try by your self with HMG3 samples managing these values.
Remember that HMG3 has SetProperty and GetProperty functions: they are most powerfull!

Cheers
Luigi from Italy
www.L3W.it
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: Change Size Menuitem im hmg.4

Post by Rossine »

Hi,

Now the same example using command syntax HMG.3:

Code: Select all


#include "hmg.ch"
#include "hbqtgui.ch"

static Form_1

Function Main

   HbQt_ErrorSys()

   DEFINE MAINWINDOW Form_1
      ROW    10
      COL    10
      WIDTH  400
      HEIGHT 400
      TITLE  "HMG4 demo change font menu"
      ONINIT Form_1:Center()

     DEFINE TOOLBAR oToolBar1 BUTTONSIZE 120, 80 FONT "ms sans serif" SIZE 12 MOVEABLE .F.

         TOOLBUTTON oButton1 ;
            Caption 'Font Menu Main' ;
            picture 'open.png' ;
            ACTION  { || Form_1:MainMenu:FontSize ++ }
            tooltip 'Change font of <Menu Main>'

         TOOLBUTTON oButton2 ;
            Caption 'Font Menu File' ;
            picture 'open.png' ;
            ACTION  { || Form_1:MainMenu:ItemFile:FontSize ++ }
            tooltip 'Change font of Option <File>'

         TOOLBUTTON oButton3 ;
            Caption 'Font Menu Help' ;
            picture 'open.png' ;
            ACTION  { || Form_1:MainMenu:ItemHelp:FontSize ++ }
            tooltip 'Change font of Option <Help>'

      END TOOLBAR

      DEFINE MAIN MENU NAME MainMenu

         :FontSize := 16  // yes, this work :-)

         Popup 'File' name ItemFile
   
           Item 'Open'        Action MsgInfo ( 'File:Open'  ) Image 'Check.Bmp' 
           Item 'Save'        Action MsgInfo ( 'File:Save'  ) Image 'Free.Bmp'  
           Separator
           Item 'Exit' Action Form_1.Release Image 'Exit.Bmp'
   
         End Popup

         DEFINE POPUP 'Help' name ItemHelp
            MENUITEM 'About' ACTION MsgInfo( 'About' ) IMAGE 'help.bmp'
         END POPUP

      END MENU

END WITH

ACTIVATE WINDOW Form_1

return NIL

Best Regards,

Rossine.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Change Size Menuitem im hmg.4

Post by Pablo César »

Many thanks Luigi for your response. I have seem all HMG samples and did not found any example. I also tried SETFONT but it doesn´t differs.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Change Size Menuitem im hmg.4

Post by Pablo César »

Hi Rossine, you found a way to do it but in HMG 4. Have you go it in HMG 3 ? Because I´m still using HMG 3.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: Change Size Menuitem im hmg.4

Post by Rossine »

Hi Pablo,

I tested it on MiniGUI extended not know how. I tried the code below but it still fails. :cry:

Code: Select all


...
DEFINE FONT font_4 FONTNAME 'Courier' SIZE 30

hFonte := GetFontHandle( "font_4" )

Define window Form_1 ;
...

   Define main menu
   End Menu

   SendMessage( _HMG_xMainMenuHandle, WM_SETFONT , hFonte, 0 )

end window

Maybe you can do this with "extended menu" of "MiniGUI extended". See the example at: <C:\MiniGUI\SAMPLES\Advanced\MenuEx\demo.prg>

See this image:
menuex.png
menuex.png (30.2 KiB) Viewed 4461 times
Regards,

Rossine.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Change Size Menuitem im hmg.4

Post by Pablo César »

Thank again Rossine. I also note this in HMGE, but I would like to do all in HMG3. Seems that in HMG3 is missing this parameter. Any way I should change developement tool.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Change Size Menuitem im hmg.4

Post by l3whmg »

Hi Pablo
Pablo César wrote:Any way I should change developement tool.
I'm sorry for my request, but FROM .... TO ....?
Can you fill "..." please ? Only if you want, obviously.

Cheers
Luigi from Italy
www.L3W.it
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Change Size Menuitem im hmg.4

Post by Pablo César »

l3whmg wrote:Hi Pablo
Pablo César wrote:Any way I should change developement tool.
I'm sorry for my request, but FROM .... TO ....?
Can you fill "..." please ? Only if you want, obviously.

Cheers
Hi Dear Luigi, I really would like to choose for HMG4 but I am still not knowing how to used it.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Change Size Menuitem im hmg.4

Post by l3whmg »

Hi Pablo.
Many thanks for your answer.
Me and other people on this forum can help you :D
But I'm sorry: can you explain your unknowing? I'm at your disposal.
In these days (Xmas) I'm little busy, but next days I can give my time to you. You also use PM.

Cheers.
Luigi from Italy
www.L3W.it
Post Reply