Item coulours in ncurses menu - ncurses

Does anyone know whether it is possible to make a menu in ncurses show different items with different colours? As far as I found out, it is only possible to change its foreground and background colours. If not possible, is there any other 3rdparty menu implementation that allows it?

The menu library does not provide a way to set the colors of individual menu items.
I'm afraid you will need to implement your own menu or modify the menu library that comes with ncurses.

The S-lang library provides good color options; you can see how it is used in the mutt email client.

Related

Extendscript dropdownlist item color

Does anyone know if you can change the color of the text for specific items in a dropdown list in Adobe's extendscript ScriptUI? I know about the color section of the Script UI guide, however that says nothing about list items and I tried a few things by chance but wasn't able to find a solution.
The ScriptUI is converted to HTML5/CSS behind the scenes. Because the CSS is not exposed to the user, it is not possible to change any of the colour schemes.
You can use images for buttons to add colour to them, but that wouldn't apply to dropdowns.
I'm not certain about the other Adobe programs, but I know that creating an extension (as opposed to a script) for After Effects is a way of circumventing this restriction.

Combox nested within another Combobox

Using wxPython, is it possible to nest a combobox inside other combobox in a similar way to how submenus are nested within menus? I need something similar for a wx.Combobox or a wx.Choice.
Or is there any widget with which this can be done?
Well, there are some possibilities:
wx.lib.combotreebox.ComboTreeBox
wx.combo.OwnerDrawnComboBox
# possibly also:
wx.lib.popupctl
You might also use a button (or some control) to invoke a PopupMenu. It may be confusing for the user though, and you might get into trouble when trying to position the Popup menu correctly. Generally speaking, I advice not to be too creative when making UI.
Have you seen wxpython demo? It is a nice showcase of all possible widgets. You can obtain it from here: https://extras.wxpython.org/wxPython4/extras/

Windows Explorer Navigation Bar in PyQt

What's the best approach to mimic the Windows Explorer navigation bar in PyQt?. Perhaps a list of QComboBoxes as part of a parent class that concatenates the current item of each combo box to resolve the final path?
Is it possible to get a similar look by using stylesheets?
This is the object I need to mimic. I just want a theoretical approach about the best way to mimic it.
Thanks in advance
This is technically known as a breadcrumb widget.
There are multiple approaches to this. The closest emulation to Windows Explorer's behavior--leaving out the normally hidden line editor--involves a chain of widgets like so:
A top level parent QWidget-derived class with your implementation, which would have:
A QHBoxLayout
An arbitrary number of QComboBoxes
A QFileSystemModel from which to populate the combo boxes.
Alternatives
You could use a single QLabels with a series of hyperlinks divided by path separators if you don't care about drop-down behavior. Qt Creator does this.
If your data source is static and not as gigantic as the filesystem, you could use QToolButtons backed by a tree of QAction/QMenus. This is possibly a masochistic approach, given that you have to populate all of the actions and menus. Since that's what they are there for, though, it might be handy as part of a context-sensitive menubar or tab bar.
I was looking for such a widget too without any luck. So I've tried to implement this by myself. It's not finished yet and needs some more work, but here's the first result: breadcrumbsaddressbar.
It's based on QToolButton widgets with menu. Parts of address which don't fit are hidden like in Windows Explorer. Also the widget has auto-completion feature.
Update: there's also a C++ widget QtAddressBar which I have't tried.

hide menu and search button from kindle fire

Is there any way to hide menu and search buttons from Kindle Fire? This (Kindle Fire Customize Soft Key menu) says there's no way to do that, but i hope something has changed since then.
Thanks!
The overflow menu is automatic and controlled by the OS (similar to the Action menu on devices based on the default Android experience). The search icon is fixed and will either take the user to the platform search or you can override it following the instructions here.
You may also be able to achieve the effect you are looking for with one of the Full Screen Modes available to Kindle developers.
Do you have a sample of the code that is failing to hide the overflow menu appropriately?

How do I get action buttons with custom layouts to be styled like standard action buttons in Android 3.0+

I'm having a bit of trouble with custom action buttons in the honeycomb+ action bar. I'm adding a menu item that uses a custom layout (using the android:actionLayout attribute). The reason for the custom layout is that I want a button that has two lines of text that can be updated dynamically.
However, I still want this action button to operate like the other standard buttons. By this I mean that the background fades in when the button is selected, and fades out again if it is unselected, all in the style of the platform (the colour seems to differ between different platforms/devices - I've seen both grey and blue versions)
I've tried using the action button style for the custom layout:
style="#android:style/Widget.ActionButton"
and I've tried setting the background for the custom layout to:
android:background="?android:attr/actionBarItemBackground"
but to no avail, and I'm kind of trying things fairly randomly as I can't find any documentation on how to do this (or if indeed it is even possible).
I know I can approximate this behaviour myself by setting the background, but it would be nice if I could just set the item to behave like a normal action button in terms of how it appears when the user interacts with it.
Anyone have any ideas?
Thanks in advance!
Ah, sorry to answer my own question but I have just stumbled upon a way to do this. I was halfway there - you need your custom layout's style to inherit from ActionButton:
#android:style/Widget.ActionButton
but then you also need to make the layout clickable:
android:clickable="true"
for it to work. Using both of these makes the custom action buttons look just like the regular ones when you press them.
Hopefully that'll help someone trying to do this!

Resources