Cursor on object after stage - cursor

I have a animation in which first cursor is pointer on whole stage and after then our animation timeline stops and cursor of stage becomes default and cursor over an object present on stage is made pointer and click event is added to it. but cursor is not working properly when cursor of stage is used. Is there any other way of doing this.

Related

Show Gtk.Popover at cursor of Gtk.Entry

I want to to show a Gtk.Popover at the position of the cursor of a Gtk.Entry. I'm only only able to add the popover relative to the entry itself, but the Gtk.Popover appears at the center of the Gtk.Entry everytime.
Is there a way how I can get the position of my Gtk.Entry cursor and create the popover at this position?
You should set the widget to which your popover is relative to, by using Gtk.Popover.relative_to; then you can use Gtk.Popover.pointing_to and the rectangle with the location of the cursor. To get that, use Gtk.Entry.cursor_position to retrieve the index of the cursor in characters and transform it into a location within the Pango.Layout of the Gtk.Entry widget; if the entry is allowed to scroll, you should also get the Gtk.Entry.scroll_offset and subtract it from the coordinates returned by Pango.

Draft-js: Losing cursor with non-editable entity components

I have an editor that is supposed to have entities with the props name, color, start, end. In the editor the text in positions denoted by start and end will be subsistuted by name, and it will be rendered by a custom component with contentEditable=false.
This works great with draftjs in general but there are a couple of issues:
When moving the cursor with the keyboard arrows, the entities are skipped over, which is good. But when an entity is at the very end of the input and I try to move rightwards past it (either just with right arrow or with option or cmd + right) the cursor disappears and doesn't come back when I move left again.
If I go right to the left of an entity and push shift + option + right arrow, the entity is selected as expected. But if I then press left arrow the cursor is also lost.
I could fix this by making sure there is always a whitespace after such a last entity, but that seems hacky and probably has edge cases.
Another option is to not use contentEditable=false, but that creates other issues with my actual app, which has a more complicated entity component including a dropdown, and I will have to manually make sure the user can't change text inside the entities etc.
Here is a reproduction of the issue: https://codesandbox.io/s/competent-surf-st77i
Any ideas?

GTK3 Update Menu bar and menu item

I have a question to ask you.
I want to make a menu updatable using a value of a int variable (If the value of the variable changes are also modified the menu items). I know the possibility to update the string of a single menu item when its is clicked (by the creation of a function in signal connect() that update the single string of the menu item), but for the first case i don't have find nothing in internet for now!
Thank you!
Just do it.
You don't need to wrap a simple integer in all the GTK+ object and event machinery; if you know when the value changes, you can just compute a new label text for the menu item and set it (using gtk_menu_item_set_label()).

Object is not destructing after removing it from the collection

In Silverlight, I have a collection of tab items. On clicking of a button, I am adding a new tab with a control as content in the collection and showing it to the screen. Now, I have a "Close" button in the screen, calling which, the current visible tab removes from the collection and thus no longer visible in the screen.
I noticed that, though the tab item has been removed from the collection from the tab item and collection, the destructor of the control part of the tab is not getting call all the time. And sometime, it is getting called after a long time (not always).
Though the item has been removed, why it is taking time to call the destructor of the object? How can I resolve this issue? Any pointers?
The destructor of the object called by Garbage Collector, when it seems necessary. Programmer should not rely on the immediate calling the destructor.

Cursor over dynamic textfield fails to track

I am having a problem and i am not sure what to do although the answer must be obvious..
I have a movieclip and inside the movieclip a dynamic text field.
I want to move the moveclip when my cursor is inside it but the problem is the area of the textfield isn't recognized as part of the movieclip although its in it. This results the movieclip to stop when the cursor touches the textfield area. Any suggestions? :(

Resources