Jump to content

Recommended Posts

Posted

Hi

 

I can change the Theme when main module is created, but, if i try change the theme after user login (in Tuniloginform) then not works.

 

I want that diferent users have diferent theme , but it's not possible if only can apply the theme in onmainmodulecreate.

 

there are any way to do this ?

 

thanks.

Posted

You must reload your app.

 

The theme is based in several files (css...) and in order load all of them you must reload you app (it's web not desktop).

Posted

Not sure if this is 100% what you want, but:

 

Set MainModule.RecallLastTheme property to True, and then assign to MainModule.Theme at runtime when you want to change the theme.  The user will have to log in again of course, but then the login form (and everything else) should come back with the new theme and will stay so until changed again.  

 

See also the AllFeatures\mdemo.dpr project which demonstrates the above, setting the theme with combobox.

Posted

I know,  but i don't want all users have same theme.

I want change theme after user logged, becouse is when i  know who is logged and which is the prefered user-theme (every user can have a diferent prefered theme).

 

then, it's not possible that diferent users have diferent themes...., becouse when user login i must reload the app to apply the user-theme, and then user must be loggeed again.

Posted

I know,  but i don't want all users have same theme.

I want change theme after user logged, becouse is when i  know who is logged and which is the prefered user-theme (every user can have a diferent prefered theme).

 

then, it's not possible that diferent users have diferent themes...., becouse when user login i must reload the app to apply the user-theme, and then user must be loggeed again.

 

That's not correct.  The theme is per browser, effectively, so as long as users are on different browsers then they can have different themes.  There's some feature (a cookie I assume) that ensures that the browser remembers its theme.  So different users can certainly have different themes as long as they're not all on the same browser/pc, which presumably they're not going to be... :)

Posted

thx, using cookies to store user theme preference it's a good solution, and only need to reload app if diferent user with diferent theme do login on same browser.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...