Popup window in Inkscape extension - inkscape

I would like to build an Inkscape extension that only tells the user te total area of the selected item(s) - not modify them.
To do that I am looking for a way to create a popup feedback window in Inkscape that provides that info to the user. Right now I know that I create a window that looks like this:
but I would like to do something less ugly. Is that possible?

It's possible, but you'd need to use tkinter for that, which you can rely on for Inkscape users to be available.

Related

Disabling a ComboBox item in Win32 API

I would like to disable an item in a combobox in my Win32 application (C++). I'm not quite sure how to do this. I'm trying to achieve something that looks like this:
Notice how CollectionItem2 and 3 are greyed-out.
Any help would be very much appreciated!
If you truly need a combobox for this, then (as #IInspectable said) you'll need to do a custom drawn control. Basically, you'll have to store some information saying which items are disabled/grayed, and draw the items appropriately based on whether they're enabled or not.
There may be a somewhat easier way though. This is normally done with a Split Button. This is button with the BS_SPLITBUTTON style set. When the drop-down part of the button is clicked, it sends a BCN_DROPDOWN notification.
You normally respond to that by displaying a menu, typically using TrackPopupMenu to display it immediately below the button (or immediately to its right, if you prefer). This is a normal menu, so it can have items enabled, disabled, grayed, have check boxes, etc., as you see fit.
If you're using MFC, it has a CSplitButton class that wraps the Split Button, simplifying the code a little bit--you can pass an identifier of a menu and sub-menu when you create the CSplitButton object, and it handles things from there.
A sample result probably looks pretty familiar:
Note: MFC also has a CMfcMenuButton class. This has roughly similar functionality, but is somewhat clumsier to use. If memory serves, it is compatible with older versions of Windows (but the split button goes back to Vista, so it's fine unless you really need to support XP).

React Native: Build a "Select Item from List" component

I want to build a "Picker Menu" inside a screen. I think the time picker popup components are not smooth enough to use, because they require extra clicks instead of just dragging to the wanted element.
The component should return the selected value + change the color of the selected value. I thought of ListView/ ScrollView, but I couldn't find a way to get that working yet.
Below: A great gimp graphic to show what the goal is, placing the Android Time Picker inside the screen as visual example.
That's what it could look like
Any ideas where to start? How can I build something like this with the React-Native components?
You can use react-native-wheel-picker or react-native-wheel-picker-android. These libraries provide wheel picker without opening any popup.

C++ Windows Forms - Password Strength

I've been following YouTube tutorials most of the day now and I think I've got the basic hang of forms. I'm aiming to create something like this below, which checks a users password and shows how strong it is:
This is what I have at the moment:
I'd like to know the basic theory behind how the top form works, specifically how I can take the user input of password in my form and just get it to print and update in realtime underneath below. I'm not quite sure what tool is used to do that, or for that matter what tool is used to create the colour changing box.
Any help or direction is appreciated, thanks!
Add a keyboardListener to your jtextfield. When a key is pressed get the text and do your stuff(figure out the strength, number of Uppercase etc)
Is this win32 or mfc forms, or some other tech like Qt or wxWidgets?
In both cases you will want to handle messages from the edit field as text is changed in it. This message is the EN_CHANGE message. Handle that message and you can get the text from the edit field and send messages to the strength form to tell it to change its color and text.
Add a System::Windows::Forms::KeyPressEventHandler (or similar) to the TextBox. When raised, do whatever analysis you need to do on the string and update the table below. The color changing box can be one of many implementations. It can be something as simple as a panel that changes its background with a System::Windows::Forms::Label positioned on top of it. It actually looks like that, as the text is not centered.

GDK : How to show status similar to 'Recording" and 'Complete"

I'm developing a GDK app where I need to provide an user experience to display status text similar to video recording status that Glass provides ( displaying "Recording" status then displaying progress indicator and finally showing 'Complete' text ). Appreciate your input.
Right now, you'll need to write your own UI logic to do this (perhaps by using a Dialog with a custom layout that has the appropriate centered label and icon, with a progress bar at the bottom, and changing the label and dismissing the dialog when the action is complete).
You may want to follow issue 271 in our issue tracker, which covers the progress indicator part of this flow.
Tony is right. There is no way to do this naively but you can build it yourself. You can create a layout that is build exactly like the menu is built in the GDK, and then just update the setcontentview() with a new layout each time you want to move to the next card. Also you can build a layout with the holo horizontal progressbar to get the general idea but it won't be like the one Google uses.
Also wanted to add that I have built a repo that you can drop into your project for this. Here is the link: https://github.com/w9jds/GDK-ProgressBar

How do I keep a button depressed in C++?

I want to create a navigation panel in my C++.net application, and I want to keep a button (or similar component) depressed to show that is the page the user is currently on.
Here is a image of what I mean:
How do I create a button that looks like that. (After further inspection, I think it's not a button, however, I cannot figure out the exact control unless it is a image drawn on the screen.)
Thanks.
That is commonly called an "Outlook Bar". There are several examples at codeproject.com