SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Main menu gets white background after language switch

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
MainSoft



Joined: 14 Feb 2005
Posts: 52

PostPosted: Wed Feb 16, 2005 2:34 pm    Post subject: Main menu gets white background after language switch Reply with quote

Hi,

Now that I have a working test drive of my app which is now using TsiLang, a new problem appeared. Whenever I switch to another language, the main menu bar gets a white background.

This is a known problem under XP for menus using an ImageList but usually, this is solved by assigning the ImageList dynamically during FormCreate instead of doing this at design time. In that case, this doesn't help, though.

Any fix?

Thanks in advance.
Back to top
View user's profile Send private message Visit poster's website
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Feb 16, 2005 3:39 pm    Post subject: Reply with quote

May be assigning ImageList property at design-time instead of run-time will solve this issue in this case?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Feb 16, 2005 3:41 pm    Post subject: Reply with quote

Or re-assigning the ImageList in OnChangeLanguage event, like:
Code:
MainMenu1.ImageList := nil;
MainMenu1.ImageList := ImageList1;
Back to top
View user's profile Send private message
MainSoft



Joined: 14 Feb 2005
Posts: 52

PostPosted: Wed Feb 16, 2005 4:01 pm    Post subject: Reply with quote

Hi,

isiticov wrote:
May be assigning ImageList property at design-time instead of run-time will solve this issue in this case?


This is what I did before. So I tried to assign dynamically. Same problem.

isiticov wrote:
Or re-assigning the ImageList in OnChangeLanguage event


Doesn't work either.

This is annoying. Everything worked flawlessly but now I have this ugly menu displayed when switching the language.
Back to top
View user's profile Send private message Visit poster's website
MainSoft



Joined: 14 Feb 2005
Posts: 52

PostPosted: Wed Feb 16, 2005 4:43 pm    Post subject: Reply with quote

isiticov wrote:
Or re-assigning the ImageList in OnChangeLanguage event, like:
Code:
MainMenu1.ImageList := nil;
MainMenu1.ImageList := ImageList1;


OK. problem solved by setting the Images propertry of the main menu to nil before setting the ActiveLanguageProperty and then resetting it afterwards:

mnuMain.Images := nil;
siLangDispatcher.ActiveLanguage := (computed value);
mnuMain.Images := ImageList;

I guess I'm not the only one with this problem so maybe this information belongs to a FAQ.

Thanks for giving me the right direction.

By the way, I also wanted to congratulate for this outstanding product. It is really well thought out. Good job! Just, the help file needs some technical editing and fixes, just to be in sync with the high quality of the software.

--
Patrick Philippot - Microsoft MVP
Consulting Services
www.mainsoft.fr
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite 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


Powered by p h p B B  © 2001, 2005 p h p B B  Group