I want to Click , Drag and Move a button on the pygtk window - pygtk

I managed to find a sample code for Images as described in the following link .
How to drag images with pygtk
However when I use it for a button doesn't seem to work .

What the original link does:
It moves (pans) the image inside a 'Scrolled Window' widget. The widget doesn't change places, only the image with respect to the widget.
If you want to move the button itself, that is more complicated! It is easier if you use the 'fixed' layout manager, where the buttons are located in absolute coordinates (as opposed to the 'normal' layout manager where all widgets are 'packed' alongside each other. There you should use drag and drop. You have to prepare the entire application for 'receiving' the button, and what to do with it when it gets there. This involves many steps! ).
Have a look at the gtk.Fixed widget's documentation.

Related

Sliding a frameless window in and out of screen edge in qml

As the title says, I want to move, clicking a button in task bar , a frameless window out and in of screen right edge .One way to achieve this under kde neon in QML, is to create a PlasmaCore.Dialog{} window and setting as flags the Qt.X11BypassWindowManagerHint only, so the window manager is bypassed.The problem with this solution is that, inside window, where i "append" some widgets in a ListView, I can not have activeFocus to TextArea and I can not type anything there. The TextArea gains activeFocus only if I use as flags the Qt.Popup only without Qt.X11BypassWindowManagerHint.
So is there an alternative solution of making the window sliding in an out from screen right edge without using the flags of Qt.X11BypassWindowManagerHint? In the below link is the code I am using now for sliding window:
https://gist.github.com/cgiannakidis70/8a0ea61d7f18e803381159d7456e2135
EDIT 1
After a lot trying and error I found that the use of flags Qt.BypassWindowManagerHint and Qt.Popup do the trick.Now I can slide the window outside screen edge and also type in TextArea inside a widget .

Codenameone form with header picture - how to navigate?

I'm writing a codenameone application where I want to have an image displayed across the top of the screen as a header. I do not want to include this image in every form/container that I create so therefore I came up with the following solution:
I have a Main form which contains the image (North) and a container (Center) which will then hold all the components of the specific screen that I want to show.
I will then create containers that represent each individual screen. My idea was to add these containers to the container of the main form, one by one and that navigation between them would be handled by changing the contents of that main screen container.
But I cannot find out how to make this work. As long as I have one single screen to show it is easy... The main form container can be an embedded container that is set to show the container for the single screen. But when I try to navigate to another I cannot make it work.
So, is there another approach I should use?
If not, how should I handle navigation between screens?
Is this with a GUI builder app or with a handcoded app?
Either way a simple way of customizing this if your app has a side menu or Toolbar would be to customize the TitleArea UIID to include your background image. E.g. start with a modern theme like the Business Theme and in the designer theme change the title area border property to be "Empty".
Then define the background image to be the image you want with "scaled to fit" or "aligned bottom" depending on what you want. Make sure to include enough space in the image for the title are and use a multi image so it will adapt for other OS's.

Edge Animate CC dynamic / animated slider

I want to make a dynamic animated slider with symbols that contain clickable actions vs a slider image only approach. I would like to use a "next" button and a "back" button that will scroll multiple background images that contain clickable links. I can produce a basic image slider with the back and next buttons, but this approach is limited. Any help on how I can do this in Edge Animate CC will be very appreciated.
I was looking for a very simple slideshow a while ago. Came up with this here:
http://jquery.malsup.com/cycle/
If you want your Slides to contain any clickable items you will be able to simply add them to the sides div. Just set the picture as a background image in CSS and you are free to develop any clickable items infront.
Here is another tutorial that worked fine for me: http://line25.com/tutorials/build-a-simple-image-slideshow-with-jquery-cycle
To me this is easy to understand and if you are used to jQuery at least a little bit this here will work out fine for you.

Text isn't always altered properly in plugin after resize

I wrote an Awesomium 1.7.2 plugin that displays a bunch of text and contains a few buttons. While the plugin functions fine, I have some strange display issues.
I have a separate program that I sometimes "Dock" at the top of my computer screen. When I do that, the text inside my Awesomium window gets warped a little (see screenshots below). That's because that window THINKS that it's maximized, but the screen has been compressed by 20 to 30 pixels; whatever the height of that separate, docked window is.
Other programs seem to be smart enough to render text appropriately when I add/remove my docked program. Also, when I view these web pages directly in a web-browser, they get resized properly after the dock change. It's only when they're inside of this Awesomium control where they don't respond properly to another program being docked. How can I make my html controls behave this way inside of the Awesomium window?
Update: I tried 1.7.3 as well, but the problem still exists.
Update: I also posted this question on answers.awesomium.com and awesomium.zendesk.com, but that hasn't helped.
SCREENSHOTS
Maximized without a docked program present:
Maximized WITH a docked program present and warped, compressed text:

jQuery Animate Toggle - Animation only works on second click

Task: I wanted to create a simple share button which extends to a share section (F,T,G,P) when clicked.
I failed to let the section slide out of the share button - what I really, really wanted - but managed to let a separate ul element slide out on the right side.
The animation worked… until I set the ul to hide initially via $('.networks').hide();
The sections is intended to only show up after a click, but now after the first click it just "pops open" ignoring the configured slide-out. Sliding only works in both directions (open and close) after clicking on it at least once .
I've uploaded an Example here at Codepen.io and as a jsFiddle.
Side note: the demos are behaving a little bit strange since they appear to only show a slide-in fx. The slide-out fx, with which we start, always looks like it pops open - that's not the case, it works after the second click, so you got to focus your eyes to see it (on a normal browser it visibly works better).
PS: Bonus points if you help me make this slide out of the "share" button. Be aware that I only have rudimentary knowledge of Javascript ( * duck and run * ).
Take a look at this fiddle link.
I changed the display property of the buttons to be inline-block instead of inline.
Elements with display inline can not have a width and i think it was the reason why jQuery was not able to animates the Elements width. I also animated the wrap around the ul instead of the ul.
EDIT: made a fast mockup of the thing sliding out of the button. Changed some css to be on the list elements itself instead of on the a elements, just work through the css and I think it will look ok.
edit forgot the link: link