window title

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

window title

Post by t57042 »

Hello,

I want to change a window title, deciding at runtime which window.
Following code does not work.
Is there a way to do this with an API call?

Richard


Code: Select all

#include "hmg.ch"

Function Main()

   DEFINE WINDOW F1 ;
      AT 0,0 ;
      WIDTH 500 ;
      HEIGHT 400 ;
      MAIN;
      TITLE 'Button Test'

      @ 70,70 BUTTON Button_1 caption "click" WIDTH 50 HEIGHT 50 ACTION title()

   END WINDOW

   CENTER WINDOW F1

   ACTIVATE WINDOW F1

Return
function title()
      win="F1"
     // F1.Title := 'Hello there !!!!!!!!!!!!!!!!!!!'        // OK
     &win.Title := 'Hello there !!!!!!!!!!!!!!!!!!!'       // doesn't work
return      
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: window title

Post by Rathinagiri »

You can use function setProperty( "f1", "TITLE", "New Title" )
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

Re: window title

Post by t57042 »

Thank you very much - very simple if one knows!

Is there somewhere a list of all those (easy) functions?

Richard
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: window title

Post by Rathinagiri »

Yes, just read HMG reference from the Doc folder.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply