I've been searching around to find a way to implement spacing on QPushButton text. I've managed to style its alignment but can't find any clue on how to create spacing between letters. I'm using pyside2 and Qt Designer to draw my window. I saw around StackOverflow questions regarding spacing between icon and text; that's not what I was looking for. If not possible, I accept any alternative to get around this problem. Thanks
While QSS is based on CSS2.1, which provides the letter-spacing property, it's not supported for widgets.
The property editor of Designer also doesn't support it, so the only solution is to do it by code, using setLetterSpacing():
font = button.font()
font.setLetterSpacing(font.AbsoluteSpacing, 4)
button.setFont(font)
Related
Help, I am having trouble completing the required functionality:
Highlight text (Select text and highlight in colors).
Make notes in the selected text.
I already tried almost all of the libraries available (https://www.npmjs.com/package/#astrocoders/react-native-selectable-text and
https://www.npmjs.com/package/react-native-cn-quill/v/0.7.6 etc), but had no success. Ideally, I would like to hire someone to implement the required functionality.
I have attached a screenshot to understand the functionality.
enter image description here
a little late but maybe this helps:
used:
"#alentoma/react-native-selectable-text"
to create this:
https://github.com/Domth13/React-Native-Highlight-Text
I am implementing drag and drop for a UWP application and all is working well, except for the Font on the DragUI caption.
I have DragUIOverride.IsCaptionVisible = True and DragUIOverride.Caption = "My Text String",
but does anyone know how to change the font? My application uses a unique font and the system font stick out like a sore thumb.
(On a similar vein, I had the same issue with ToolTips, but figured out how to set a new style for ToolTip in <Application.Resources>, but I cant seem to find anything (i.e. a TargetType) for the DragUI text.)
Any help appreciated.
Can the Font for a UWP Drag and Drop (DragUI) caption be changed?
I'm afraid, you can't change the font style for DragUIOverride.Caption, currently, there is not such api to change Caption font, it was manage by the system. And you could post your requirement with windows feed back hub.
And we have a workaround that use SetContentFromBitmapImage method insert text image to replace DragUIOverride.Caption. For more please refer XamlDragAndDrop code sample
I would like to add a floating button in PDF. However, after doing a lot research on internet, I didn't find any answers.
I would like the button to float/move across the pages with the scroll bar as the document is scrolled. Is there a way to implement it in PDF?
Note: I would prefer to not to use JavaScript to implement it.
Thanks in advance.
As #mkl commented, it is not possible to add a floating button in PDF without using JavaScript.
PDF is meant to be used for fixed layout and not dynamically change as it is being viewed.
The closest I could find to what you are looking to do is this article about creating text that shows/hides depending on where the cursor is. I can't think of a way to leverage this though to change the position of a button as a user scrolls and even then you would most likely run into different PDF viewers handling it differently.
Is it possible to access the TextBlock Template to change the border and make it curved?
I tried editing the Template through Blend but with no success.
I'm trying to achieve something like this (couldn't get that given solution working):
Curve TextBlock in Windows 8
I'm trying to do this in C#/XAML - WINRT (Windows 8.1)
I don't think a TextBlock has a template you could modify. It's probably just some parameters used to tell DirectWrite what text to render and with what properties. The easiest way to solve it is when your text is constant to just break it apart into multiple single letter TextBlocks and lay them out on a path using Blend or Illustrator. If don't control what text can show up on the path - you'd have to code up the layout algorithm. Chris's link seems like a good place to start.
There isn't a clean way to do this directly in Xaml. Like Filip says, you can approach it by breaking the letters apart. That can work well for long sentences with small letters, but can be pretty chunky with large or connected letters. If you need smoother rendering then you can interop to Direct2D.
MSDN has a Direct2D animated text on a path sample which you could combine with the XAML SurfaceImageSource DirectX interop sample
I'm trying to make each letter a "square" essentially, so each letter is no more tall than it is wide, in vb.net. Is this possible? If so, how? I can't seem to find anything, and I've been searching hard.
Thanks for the help!
Why dont you just use a fixed size font ? Or create your own font ?
The Windows API has a function called SetCurrentConsoleFontEx which you could pinvoke. It accepts a width and height, font etc. Depending on how it handles these you may also need to make and add a 'square font' to the registry list of allowed fonts (example of adding a new font to the console here.)