KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Strange effect when using a form menu

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Wokkeltje
KiXforms Regular
KiXforms Regular


Joined: 12 May 2004
Posts: 39
Location: Torhout, Belgium

PostPosted: Mon May 17, 2004 5:35 pm    Post subject: Strange effect when using a form menu Reply with quote

I wrote a multilanguage application, the text for labels and the menu comes from an ini file.

No I created a menu Language wwhere people can choose their prefered language. When they sellect, I use a function to Reset all the .Text properties.

The strange effect is now when I use a seperator in my menuand select an other language, it is replaced with the text of the menuitem that is above the seperator.

I just use the following code to set the menu items in a different language.

Code:

$Form.LanguageMenu.Text   = ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","MenuLanguage")
$Form.HelpMenu.Text      = ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","MenuHelp")
$Form.AboutMenu.Text   = ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","MenuHelpAbout")



Could this be an error in the KixForms? I use buld 44 and 45. Or am I doing things completely wrong or against the normal KixForms way of working
Back to top
View user's profile Send private message Visit poster's website
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon May 17, 2004 6:03 pm    Post subject: Reply with quote

Will look into this right away ...
Back to top
View user's profile Send private message
Wokkeltje
KiXforms Regular
KiXforms Regular


Joined: 12 May 2004
Posts: 39
Location: Torhout, Belgium

PostPosted: Mon May 17, 2004 6:29 pm    Post subject: Reply with quote

I use the following type of menu
Code:
$Form.Menu = $System.MainMenu()
$Form.Menu.Style = 1
$Form.Menu.ImageList = $System.BuiltinImageList()

;File
$Form.FileMenu = $Form.Menu.MenuItems.Add(ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","MenuFile"));

;File/Generate
$Form.GenerateMenu = $Form.FileMenu.MenuItems.Add($cmdGenerate.Text);
$Form.GenerateMenu.ImageIndex = 1
$Form.GenerateMenu.OnClick = "fnGenerate()"

;File/Seperator1
$Form.Seperator1 = $Form.FileMenu.MenuItems.Add("-")

;File/Exit
$Form.ExitMenu = $Form.FileMenu.MenuItems.Add($cmdExit.Text);
$Form.ExitMenu.OnClick = "fnExit()"



if it is that what you mean?

If I run the following code, the seperator gets the layout of $Form.GenerateMenu, the events are not copied, sometimes the seperator remains to its small size (the height) but not always.

Code:

$cmdGenerate.Text   = ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","cmdGenerate")
$cmdExit.Text      = ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","cmdExit")

$Form.FileMenu.Text      = ReadProfileString($WorkingDir+"\Language.ini","$DefaultLanguage","MenuFile")
$Form.GenerateMenu.Text   = $cmdGenerate.Text
$Form.ExitMenu.Text      = $cmdExit.Text
Back to top
View user's profile Send private message Visit poster's website
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon May 17, 2004 9:50 pm    Post subject: Reply with quote

Give the latest developers build a try ...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group