I'm wondering if it is possible to implement a very simple web browser with wxPython, I know you can use wx.html.LoadPage() function but it does not work very well, I want a basic standalone/browser just like the following code (image link) written with Pyjamas with the pyjd.setup() function
Then you'll want to look at the HTML2_WebView widget. It's cross platform and should work for most websites. There is an example in the wxPython demo. Note that it's new in wxPython 2.9. You can read more about it in the documentation:
https://wxpython.org/Phoenix/docs/html/wx.html2.WebView.html
Or check out the following link for another example:
wxPython WebView example
Related
Am currently working on a uwp project which involves using a carousel that has some sort of grid of pictures that can be swiped by clicking some round navigation buttons. This is also similar to the carousel in Twitter bootstrap. To get a better picture of this, an example is shown below
Rather than different apps on display, different pictures from the user library would be shown. I would like to dynamically display the first 100 pictures from the user's library. I have searched the internet for something similar to this, but the closest I can get is http://blogs.u2u.be/diederik/post/2015/08/23/A-CoverFlow-control-for-the-Universal-Windows-Platform.aspx.
How can I achieve this?
Have you taken a look at the FlipView class?
https://msdn.microsoft.com/library/windows/apps/br242678
Or the CaouselPanel class?
https://msdn.microsoft.com/library/windows/apps/hh967950
and implemented them with a different data template (perhaps a styled gridview) instead of strictly images?
This is the flipview page from the windows dev center:
https://msdn.microsoft.com/windows/uwp/controls-and-patterns/flipview
It should explain the basics of how the itemcontrol works.
Have a look at FlipView. I hope that is what you are looking for.
What is the best way to create a menuitem (for the Gtk.MenuBar) that should open the default browser with a new tab and loading an URL?
Is it possible to do that in Glade directly or do I need to create that function in the program code itself? Is there a preferred way in Python 3 to do that?
After a lot of searching for a Glade-only solution, I think that Gtk.Menuitem doesn't have a URL-open option. I now just defined on_menuitem_clicked-function that uses:
webbrowser.open_new_tab()
from the standard library.
I have been working with Vaadin charts during this week and I found a problem that I cannot solve. I need to send several charts to a PDF generation (using iTextpdf) and I could do it using SVGGenerator. The main problem is I cannot use this solution because the final laptop doesn't allow any installation, and Phantomjs is required for SVG Generator (no add-on can be installed neither). I tried to find a different solution to convert the chart content into file or buffer that I can manage, but I think I have been reading so much posts and I am not able to distinguish the solution.
So, I will try to clarify basic questions first:
a) Is it possible to manage SVG Generator without any installation in the laptop?
b) If not, is there a different way to convert a chart into an object which class could be managed to insert it into a PDF?
I can assure you I tried to read all documentation in this forum and official Vaadin forum related to this topic but I couldn't find any solution. I don't want to seem lazy, I only want to avoid spending more time and clarify the maining pre-conditions to solve this issue.
thanks in advance for your time and help.
Kind regards,
David.
You can take a screenshot of your chart and append it to pdf:
Screenshot screenshot = new Screenshot();
screenshot.setTargetComponent(myTargetComponent);
myChartLayout.addComponent(screenshot);
//when complete
screenshot.addScreenshotListener(new ScreenshotListener() {
public void screenshotComplete(ScreenshotImage image) {
//do something
}
});
//take screenshot
screenshot.takeScreenshot();
You will not be able to render a Vaadin Chart without a web browser engine of some kind. That's what PhantomJS provides. If you have a full-blown web browser at your disposal, though, you can grab the SVG markup manually from there; it's just a bit more difficult to automate. This works in Chrome:
Open your Charts app in the browser
Open the JavaScript console (Ctrl/Cmd + Shift + J)
Type something like this: copy(document.getElementsByTagName('svg')[0].outerHTML)
Paste the contents of your clipboard to a new text file and save it as an SVG.
You don't need to install phantomjs, just bundle its binary along with your web application (Reference). I did the same thing with my Amazon AWS deployment and it works just fine.
Im trying to use this image with Raphael:
http://upload.wikimedia.org/wikipedia/commons/9/9f/Argentina_Buenos_Aires_City_location_map.svg
I convert it to js with: http://toki-woki.net/p/SVG2RaphaelJS/
And I get this:
Any Idea of what can I do to solve this? This is worst apparently when I add text in inkscape above each reagion to change later via javascript.
Im using SVGWEB now without problems buy Im trying another alternatives because I cannot make the addeventlistener work in IE7/8 like I said here:
can't add listener to a SVG in Internet Explorer using SVGweb
Any ideas?
Thanks!
Try mapSVG plugin instead.
Demo with your map: http://map.karaliki.ru/bu.html (zoom in-out with mouse wheel)
It works in IE7-8 as well.
Plugin's description: http://map.karaliki.ru
One big piece missing on richfaces is a chart support. In my case what I need is a simple bar chart, with no interactivity to put into a jsf (richfaces 3) page, into a javaEE 6 web-application that must run only with opensource libraries
Anyone can give me some options?
thanks in advance!
note: I'm thinking on jfreechart, obviously, but what I need is something skinnable fast, with no pain
you could have a look on JSFlot .People say it works well with richfaces.
The JSFlot JSF chart library builds on top of the JavaScript Open
Source Project Flotr (a javascript plotting library based on the
Prototype Javascript Framework) to create stunning interactive charts
purely using JavaScript. The JSFlot charting library is simple to
install, easy to configure and easy to use in your custom application.
All of the applications dependencies (purely JavaScript related) are
included in the Jar file.
The goal of the JSFlot project is to support all the main features of
Flotr (Flotr has its own project page set up at
http://code.google.com/p/flotr/), while remaining easy and simple to
install and use.
We used JQPlot for charting in our project. Pluggable, Interactive and look good. Check them out:
JQPlot Bar Charts