1. Washington Rosero
  2. PowerBuilder
  3. Friday, 16 September 2022 22:37 PM UTC

Buenas tardes tengo un problema, no sé aplica el UI Them de powerbuilder 2021 al momento de abrir la aplicación en el cliente a pesar que lo he configurado como dice la documentación al respecto.

He colocado esta línea en el opende mi window principal y que es heredada por otros windows

ApplyTheme(".\Themes\Flat Design Silver") y en mi aplicación lo he configurado en propiedades adicionales.

 

Si a alguién le pasó lo mismo y lo solucionó por favor su ayuda, pasa en cualquier versión de windows.

 

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Saturday, 17 September 2022 11:51 AM UTC
  2. PowerBuilder
  3. # 1

Hello,

1.   ApplyTheme command should be in application open event
2.   The Theme folder should be available as a subfolder of the current application's folder
3.   Try with   ApplyTheme("Themes\Flat Design Silver") 

Double check whether the folder name is Theme or Themes.    

Happiness Always
BKR Sivaprakash

 

Comment
  1. Chris Pollach @Appeon
  2. Saturday, 17 September 2022 17:52 PM UTC
Hi BKR;

FWIW: I can do an ApplyTheme() command at anytime and anywhere within an STD Framework based App and it activates the new Theme right away with no App issues. Of course, you still need to restart your PB App when turning themes off. ;-)

It would be interesting to hear back though from other Theme based PB App developers on there experiences.

Regards ... Chris
  1. Helpful
  1. Sivaprakash BKR
  2. Monday, 19 September 2022 05:11 AM UTC
Thanks Chris,

As per Powerbuilder Reference @

https://docs.appeon.com/pb2021/powerscript_reference/ApplyTheme_func.html#:~:text=The%20ApplyTheme%20method%20should%20be%20called%20when%20all,precedence%20over%20those%20selected%20in%20the%20PowerBuilder%20painter.

**************************************************************

It's usage part

Usage



The ApplyTheme method should be called when all windows are closed, for example, it can be called in the Application Open event when all of the child windows are not yet opened.

The theme path and name set by the ApplyTheme function takes precedence over those selected in the PowerBuilder painter. See the following code examples for illustration.

*****************************************************************

So far we haven't here tried it setting in any other window, except application open event.

  1. Helpful
  1. Benjamin Gaesslein
  2. Wednesday, 21 September 2022 14:10 PM UTC
Simply applying a different themes while the app is running doesn't work for me at all. (PB 2019 R3) What does work is applying an "empty" theme first (meaning a theme.json that has everything set to "drawing":false) and then applying the new theme. I think I vaguely remember this causing crashes under certain circumstances, though.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Saturday, 17 September 2022 01:56 AM UTC
  2. PowerBuilder
  3. # 2

Hola Washington -

De acuerdo con la ayuda para la función de PowerScript ApplyTheme, esta función debe ejecutarse cuando no hay ventanas abiertas, como en el evento Abrir del objeto Aplicación.

Además, ¿ha implementado la carpeta JSON del tema y las DLL de tiempo de ejecución requeridas? Consulte la documentación enumerada por esta URL:

   https://docs.appeon.com/pb2021/application_techniques/Deploying_Applications_and_Components.html

Busque en la tabla bajo el título "Archivos de tiempo de ejecución adicionales".

Saludos, Juan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.