In ImGUI, is it possible to change the icon at the left of a collapsing header? - imgui

I created a date picker using a collapsing header, and I'd like to change the arrow to the left if possible.
Is there a concise way to do this? Or do I have to like, remake the whole collapsing header item from scratch?

Related

How to Change django-autocomplete-light input box styling?

I have gotten the autocomplete to work with my Database and my front end, but the input widget looks slightly off.
Is there a way to change the styling for the input?
Also, is there a way to remove the initial dropdown, so after you click once, you can start typing and suggestions will appear? I am using the ListSelect2 Widget. The Select2Multiple looks like more of what I need but I want input to be only one.
Current Widget Pre-Input
Current Widget During Input
Current Widget After Selection
Desired Look (Select2Multiple Widget)
I would appreciate any suggestions!

Listing customization ServiceNow

How can I personalize a list within ServiceNow?
I mean, I have this list:
But I think its very confusing to see the position on the right side.. How can I center it?
Like CSS customization or JS or something like that.. where can I find the customization form?
You can customise the position of the field content by using Field Styles.
If you mean customising the position of the field header, I have had a play around with doing this and I seem to have got it working.
If you inspect the HTML of the column header you want to target (the th tag), you'll see that there's an attribute on it called glide_type which contains in it the type of column. You can use this to create a CSS rule to target only headers of a particular type.
For example, I have a field of type decimal, and the th tag has the following attribute:glide_type="decimal". So to target that element, I could create a CSS rule like the below:
th.text-align-left.list_header_cell[glide_type="decimal"] {
text-align: right;
}
The hacky part is including that CSS so that it applies throughout the SN interface. You can use a UI Script to run some JavaScript which includes the Style Sheet. So if you put the above CSS inside a new Style Sheet (navigate to Content Management > Design > Style Sheets), and copy that new Style Sheet's Sys ID, you can create a UI Script with the below in it to include that Style Sheet on all pages:
link = document.createElement("link");
link.href = "STYLE_SHEET_SYS_ID_GOES_HERE.cssdbx?";
link.type = "text/css";
link.rel = "stylesheet";
link.media = "screen,print";
document.getElementsByTagName("head")[0].appendChild(link);
After doing that, you'll see that the Style Sheet is getting loaded on all pages, and if you've written your CSS right then you should find that the column header is now right-aligned!
As #Kirk said, performing this kind of customisation will mean that it's hard for ServiceNow Customer Support to assist if there's something you've customised getting in the way of their troubleshooting. Take this into account if you decide to implement something like this, and also thoroughly test this on a non-production instance.
In addition to the above, this solution may break in future releases as ServiceNow may decide to change the way that lists work and thus the CSS selector may no longer target the right/any element.
Hope this helps!
Dylan
It's not suggested to customize any sort of CSS or JS with that, we were told that is voids your support for that section if you do so.
You could just add a few more display fields if you really desire to remove the extra white-space.
For a complete description of that (which you may know how to do):
Click the Gear icon
Then select some relevant fields from the Available section, and click the Right arrow to add them.

Two column TPopupMenu to list shortcuts right aligned

Using Borland/CodeGear/Ebarcadero C++ Builder 2009. Is it possible to show shortcuts (or other text), right aligned in a second column in a TPopupMenu ?
For instance:
[image] Open File ctrl-O
[image] Close File ctrl-W
[image] BlahBlah ctrl-B
etc.
If so, how ?
I checked the break property on an item, but the results is not exactly what I want, since items are selectable on their own, instead of the complete line. Also it's not drawn that nicely.
Your feedback appreciated.
A menu item can have an image (see the TMenuItem.ImageIndex property), and can have a shortcut assigned (see the TMenuItem.ShortCut property). The VCL will automatically draw those elements for you, exactly as you have shown.
By default, they are a little squished together. You can use the TMenuItem.OnMeasureItem event to extend the Width:
If you still do not like the way the default drawing looks, or you want different text than the ShortCut to appear on the right side, you will have to owner-draw the menu items yourself (see the TMenuItem.OnDrawItem and TMenuItem.OnAdvancedDrawItem events), then you can make the menu items appear however you want.

Qt - Display several, selectable lines

Im writing a tool that simulates Turing machines.
Here, Ive got a transition table of a such a machine
When a cell is double-clicked, a little dialog pops up (which is a custom widget, derived from QFrame) and should allow editing the contens of a cell. A cell may contain several rules (those |q2, 3, R| and such) and I want that little dialog to show these. The thing is that a user should be able to add and remove rules. At first, I wanted to use QLabels for that, which is fine with the adding aspect, but how do I remove existing rules? I planned having the user select the rules and click "Remove" but do I make sure the entire rule (QLabel) is selected?
Or should I take a completely ddifferennt approach to removing? Like letting every label have an own checkbox?
I would like to keep it as simple as possible. For example, QTableWidget is too "fat" for this, I feel like
You should use a QListWidget - this will allow multiple lines, multiple selection, without the cells or horizontal/vertical headers.
http://qt-project.org/doc/qt-4.8/qlistwidget.html

Any way in Eclilpse to see what method your cursor is in, without scrolling up to the top of the method?

I work with some very large files in Eclipse (3.5.2)
As I move the cursor around inside the file, I can lose track of which method my cursor currently in. As such I have to scroll all the way back up to the top of the function to see it's name.
Does anyone know of a way to have this displayed in Eclipse's user interface?
If you have the Outline view open, it tracks which method your cursor's in.
Another way is to turn on the "breadcrumb" across the top of the editor. It shows the full path to where you are: project -> source folder -> package -> class -> method/field.
Edit: It seems this feature is only available in JDT. Outline view seems to be your only option.