Visible separators in win32 api toolbars (not just gaps)? - winapi

I want it to look like this (just the separator)
this is what I have:
How would i go about doing this?
The separator at the moment is just this, nothing else in the TBBUTTON struct is set for the separator
tbb[3].fsStyle = TBSTYLE_SEP;

The Win32 control only draws vertical separator lines if the toolbar uses the flat style. So you can achieve the effect you want by including the TBSTYLE_FLAT style when you create the toolbar window.

Related

Is there a way to change the font size in the serch dialog Find and Replace with fields

Is there a way / settings to change and / or increase the font size in the search / find dialog (field where text is typed, not talking about the label) ? Example with long regexp, it becomes non readable at all, (stupid) example:
Find: ^/drive/www-root/aw/([a-z0-9_]+)/(.*)xml$
Replace with: # necho " " >> /drive/www-root/aw_files/xsltproc_1.done nxsltproc -o /drive/www-root/aw/1/2html /drive/www-root/aw/resources/1.xslt /drive/www-root/aw/1/2xml
enter image description here
Thanks
Although you can't specify the font size in the Find box to any arbitrary size, you can make it use the same font size as the editor. To do this, select Customize on the Tools menu, select the Search page, and ensure the Change Font for Find/Replace Drop-Down List option is set, and the Change Font only if Character Set of Selected Font is not System Default is clear.
An alternative way for such tasks:
EmEditor can grab text from such controls via its tray icon app (emedtray.exe).
Run emedtray.exe;
Add a hotkey for Grab: http://www.emeditor.org/en/dlg_tray_index.html
Then click (to set focus) in the field you want edit; Press the hotkey;
The text in that field should be grabbed into EmEditor main window;
Then you can view/edit it with the abundant functions EmEditor provides (including Ctrl+wheel to change font size);
After editing, just close that window, the edited text will be sent back to the source field.

NS button text interprets FontAwesome

If I set the text of the Button whose font is FontAwesome to something like "Download" - it interprets 'down' as an font from FA as well as 'ad'
e.g. Open = it'll display O and then a pen icon from FA.
Very weird - how can I stop this.
I'd like the button text to contain both FA icons (specified with unicode escape codes) and regular text.
I haven't used FontAwesome recently, I recall they use to denote icons by character code so there were no issues in combining text along with icons, not sure if that's changed now.
As a workaround you can use formattedText instead of text. You will be able to use different fonts within Button with 2 different FormattedString definitions, one for icon and another for text.

How can I change size between lines in Unity3D's GUILabel

For my GUI I am using GUILabel.
How can I change the size between lines?
Unlike a GUIText there is no way to set line spacing for a GUILabel.
While a GUILabel is able to show multi-line text, to adjust the spacing you would have to insert extra newlines or modify the font used.
You can change the line height if you create a editable copy of the font, you just have to click in the font (in the Assets panel), go to the gear icon of the Inspector panel and click "Create Editable Copy". The new copy on the Assets panel has a parameter called "Line Spacing" that you can modify at will.
I think you need to assign a GUIStyle to your label then you can use:
http://docs.unity3d.com/Documentation/ScriptReference/GUIStyle-lineHeight.html
== EDIT ==
lineHeight is readonly ... seems not possible currently.. try modifying the font instead

Disable wrapping for some lines but not others

I have a NSTextView subclass. It displays normal text (which should wrap, ideally around the 80-char line) and ascii style tables (which should not be wrapped).
Mockup:
As you see the text on top is wrapped, while the table extends.
I have code that figures out if a line is a table, but I need some ideas on how to go with the selective (non)wrapping.
Use multiple text containers with your layout manager.
"This one is the width of the text view (it wraps); the next one is as wide as it needs to be (doesn't wrap); etc."

How to get a superscript in Qt Creator for label text?

I am trying to create a superscript of a 2 to show something is squared for the units label that comes after a field the user supplies in my dialog. I am using Qt Creator v2.0.1 on Windows. The QLabel has a text field and a textFormat field. I attempted to solve this by setting the textFormat combobox to RichText and then set the textFormat field to be: "µm{\super 2}" however, when previewing my dialog, the text is taken literally and not as RichText and thus there is no superscript 2 but instead the '{super 2}' with the backslash removed. I also tried escaping the backslash with '{\super 2}' but I then the literal '{\super 2}' when previewing the dialog.
How can I specify the superscript to Qt Creator so that my dialog preview shows the superscripted 2?
Here is how I want it to look: µm2
Apparently html works (not sure why RichText did not):
µm<sup>2</sup>
I find another easier way which is similar to #WilliamKF solution but it is easier for me.
for example, we have one QLabel in our UI like this :
For adding I right-click on that label and choose Change rich text ... and I will see this Dialog.
There I can easily write what I want and add superscript like this:
Then if I click Ok I have what I want and also I can choose source to see HTML tags :
<html><head/><body><p><span style=" font-size:16pt;">µm</span><span style=" font-size:16pt; vertical-align:super;">2</span></p></body></html>

Resources