Darlan Posted January 29, 2023 Share Posted January 29, 2023 how do i change the theme at runtime, example: switching from aria to neptune Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 29, 2023 Share Posted January 29, 2023 Hello, Exactly at what moment? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted January 29, 2023 Share Posted January 29, 2023 15 hours ago, Darlan said: how do i change the theme at runtime, example: switching from aria to neptune Hello, look for C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\ThemeChange Quote Link to comment Share on other sites More sharing options...
Darlan Posted February 18, 2023 Author Share Posted February 18, 2023 On 28/01/2023 at 23:52, Sherzod said: Olá, Exatamente em que momento? coloquei um botão no config, que selecione 2 temas. Exemplo: UniMainModule.Theme:= 'aria'; Me informaram para ver o exemplo no Demo ThemeChange mas este demo não compila I put a button in the config, which selects 2 themes. Example: UniMainModule.Theme:= 'aria'; Let me know to see the example in the ThemeChange Demo but this demo doesn't compile. how to allow user to switch to another theme? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted February 18, 2023 Share Posted February 18, 2023 34 minutes ago, Darlan said: coloquei um botão no config, que selecione 2 temas. Exemplo: UniMainModule.Theme:= 'aria'; Me informaram para ver o exemplo no Demo ThemeChange mas este demo não compila I put a button in the config, which selects 2 themes. Example: UniMainModule.Theme:= 'aria'; Let me know to see the example in the ThemeChange Demo but this demo doesn't compile. how to allow user to switch to another theme? Hello, I use Combobox with all Themes and show this on MainForm to change Theme just add this: on UniComboBox_ThemeChange (); begin If UniComboBox_Theme.ItemINdex <> -1 then UniMainModule.Theme := UniComboBox_Theme.Text; end; You need to make UniMainModule.RecallLastTheme := False or True; here is how to load all themes in Combo: var S : TUniStringArray; ThemeI : Integer; begin S := UniServerModule.ThemeManager.AllThemes; TRY UniComboBox_Theme.Items.BeginUpdate; UniComboBox_Theme.Items.Clear; for ThemeI := Low(S) to High(S) do UniComboBox_Theme.Items.Add(S[ThemeI]); UniComboBox_Theme.Text := UniMainModule.Theme; FINALLY UniComboBox_Theme.Items.EndUpdate; END; end; 1 Quote Link to comment Share on other sites More sharing options...
Darlan Posted February 22, 2023 Author Share Posted February 22, 2023 Hi, Now it worked right. Was missing: UniMainModule.RecallLastTheme := True; Thank you for your help.👍 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.