To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
How to get screen resolution at the time of starting an application.
WebApplicationContext context = ((WebApplicationContext) getApplication().getContext());
WebBrowser wb = context.getBrowser();
int width = wb.getScreenWidth();
The above code gives 0 at the time of starting the application (ie, in init() function). But I wants to set at the time of starting the application.How it possible to get screen width .
It is not possible from the constructor as something has to be sent to the client browser to get the screen size.See this thread for instance.