powerbuilder .saveas method works for black and white pdf? - powerbuilder

Whenever I do .saveas for colorful datawindow.. It is giving me black and white pdf file. Is there any solution to get directly colorful print as I want to save it in folder.

You didn't mention what version of PB you are using, but I am assumming you are using Ghostscript. You need to go into your Printers and go to the properties of the "Sybase DataWindow PS" entry. You need to change Driver to a printer that has "color" and "PS" in its name. That will allow you to save your PDFs in color.


How to copy text from tmux window to system clipboard?

I am using Ubuntu 16.04 with tmux 2.1. Mostly I split the screen in two tmux windows split vertically. Frequently I need to copy long pieces of text from tmux window and paste in sublime text/browser. I have a feeling that xsel/xclip could be used to achieve the same. However, most of the how-to's floating in the Internet are severely bloated, trying to explain intricate configuration option without really explaining:
What exactly do I need to configure in tmux.conf?
How do I select a piece of text in tmux window?
How do I copy the selected piece of text?
How do I paste the text from system clipboard to text editor/browser?
I don't want to be a tmux guru. All I want to get the job done in simplest possible way. Any clue how to do that?
You can start by looking at the example configurations at: /usr/share/doc/tmux/examples$
You can also look at the current key bindings using ctrl+b+?.
You can change these default key bindings in the .tmux.conf file.
It depends on your settings how you select a piece of text in tmux window. You can map the key bindings as per vim. Enter the copy mode (ctrl+b + [), scroll to the start/end of the text you want to copy to the tmux clipboard, press v (provided the key bindings as per vim) to start copying. move to the other end of the text, press y to yank the text. press ctrl+b+] to paste the text.
I am trying to figure out how to copy/paste from system clipboard on this version. Will update my answer if I have any luck.

vim in ubuntu terminal: “background” property is set after vimrc is loaded

I use vim in ubuntu's default terminal.
I set two terminal profiles: one named "dark" with colors > built-in scheme > "Solarized dark" and one named "light" with Solarized light.
In Vim I like to have the cursor line highlighted so I put this command in my vimrc:
hi CursorLine cterm=NONE ctermbg=254 ctermfg=NONE
This highlights the cursor line with a light gray background. It's perfect when using Solarized Light, but not at all when using Solarized Dark.
Luckily and by some mechanism I do not understand, vim is aware whether I am using solarized dark or solarized light:
the background option is being set to "light" or "dark" accordingly.
For instance if I am using solarized light this is what happens:
:set background?
So I thought I would use that in my vimrc to change the cursor line color depending on what color scheme I use:
set cursorline
if &background == "light"
hi CursorLine cterm=NONE ctermbg=254 ctermfg=NONE
hi CursorLine cterm=NONE ctermbg=238 ctermfg=NONE
Problem: It doesn't work. Cursor line is always in light gray,
as if the background property was always set to "light".
It seems that at the time when vimrc is loaded the background property has not been changed already.
Note that if I execute source ~/.vimrc when I am in Vim it works great, the cursor line is highlighted with the proper color.
Any idea on how to fix that?
vim 7.4.1689
GNOME Terminal 3.18.3
Ubuntu 16.04 LTS and Ubuntu 17.04
Note that I do not have any :colorscheme <something> in my vimrc: I get solarized themes via gnome terminal profiles. I don't think Vim "knows" I am using these colors; it is just that somehow some script sets vim's background variable according to my gnome terminal color choice.
There is a vim plugin named AfterColors.vim that allows one to customize things after a color scheme is loaded. You basically need to put your highlight cursorline statement (hi CursorLine...) in after/colors/common.vim file.
From the documentation of AfterColors.vim script:
Allows you to create an after/colors/ script for customizing any
-- EXAMPLE -- If you like the 'desert' colorscheme, but you really want comments to be red and functions to be blue, previously you would
copy the entire colorscheme into your home directory and customize it.
With this plugin installed, you can create a small script to change
just the parts you want for that colorscheme, exactly how you would
for an ftplugin or syntax script:
For unix systems you would create: ~/.vim/after/colors/desert.vim:
highlight Comment guifg=Red ctermfg=Red
highlight Function guifg=Blue ctermfg=Blue
On windows you would create: C:\Documents and
highlight Comment guifg=Red ctermfg=Red
highlight Function guifg=Blue ctermfg=Blue
-- VERSION 6 WARNING -- If your Vim is older than version 7, then the after/colors scripts will only be loaded once when Vim starts. This
will not be a problem if you choose your colorscheme in your .vimrc
file, but if you change your colorscheme after vim has loaded then
your after/colors scripts will be ignored. This is not an issue in
Vim 7.
install details
1) Put AfterColors.vim in ~/.vim/plugin/ or $HOME\vimfiles\plugin\
2) Create your colorscheme customizations in after/colors/.vim
3) Create global customizations (for all colorschemes) in after/colors/common.vim
Link: AfterColors.vim plugin home page

How can I extract a PNG from a delphi XE5 firemonkey style?

I'm trying to change the color used when elements of the MetropolisUIBlack.Style XE5 style (Firemonkey). It seems that, in order to do so, the simplest way would be to edit the PNG image that contains all these elements i the style (MetroBluestyle.png).
Unfortunately, I can't find a way to save the PNG that is contained in the style element to a file so I can manipulate it safely and reload it once the color has been changed.
Use the Bitmap Style Designer provided with the product.
You can find it in the Tools menù and, once started, you simply have to open the MetropolisUIBlack.vsf file, select the "style.png" item under Images and click the Export button (above the right panel where you can see a preview of the picture).
Edit the picture with your favorite editor (i.e. The Gimp), save the picture, and load it back in the style using the Update button (just left the Export one).
You can save your style with a different name and use it as usual.

How to make ruler always be shown in Sublime text 2?

I use Sublime Text 2 and want a Ruler to be shown in every file with specific line-height. But I have to show it manually in every file.
Edit the "rulers" value in the default settings to contain the column number you want the ruler to be displayed on, and it will persist.
Go to Sublime Text > Preferences > Settings - User
Add a "rulers" setting with the lines you want for the ruler:
// Adds a single vertical ruler at column 80
"rulers": [80],
If you want multiple rulers, separate the values with a comma:
// Adds two vertical rulers: one at column 80 and one at column 120
"rulers": [80, 120],
Rulers not showing? Rulers are only shown when using a monospace font, which is the default font for Sublime Text. Ensure you are using a monospace font if the settings above don't work for you.
Never edit Settings - Default; edit Settings - User instead. If you upgrade your SublimeText version you will lose all of your settings because Settings - Default will be overwritten.
In the Packages folders the 'User/' folder will be ignored between upgrades of SublimeText, the settings here will be persistent.
To enable the persistent rulers in any document, add the settings in Defaults - User:
"rulers": [75, 80, 85]
This example will display 3 rulers, at 75, 80 and 85 chars length.
As others have stated before me, select Preferences -> Settings-User and change
"rulers": [],
"rulers": [80],
in order to display one ruler at column 80.
Now for the rub, it seems that one must use a monospaced font in order to display rulers so you'll also need to change
"font_face": "",
"font_face": "Monospace",
or any other monospaced font.
Thinking about it, this makes sense. If different characters have different widths, then the ruler could potentially not be a single line, but a bunch of annoying line segments. I noticed this while using the default font and my column numbers were not the same for the same vertical position. At the same time, my fancy ruler was specified but not displayed. Changing the font to Monospace solved both problems.
While the answer by Ross Allen is great, it isn't the most convenient if you find yourself wanting to toggle the rulers on and off or change the width at various points while using Sublime.
Luckily, someone made a Package that allows you to do this.
The package works in both Sublime Text 2 and 3.
Install Instructions:
Install PackageControl
Open PackageControll (e.g. via ⌘ + SHIFT + P)
Type "Install" and select "Package Control: Install Package"
Type "QuickRulers" and hit Enter to install the QuickRulers package.
You can access the command (quick_rulers) through several different means, but by default it is loaded in Omnisearch via "QuickRulers: Open Panel". (i.e., Hit ⌘ + SHIFT + P and type "QuickRulers: Open Panel")
If you change font, ruler will not be displayed. E.g. I set "font_face": "Lucida Grande", and ruler disappeared.
I just had this problem and noticed that the my ruler was only showing up when I was slightly scrolled to the right horizontally. Turns out the reason it was disappearing was because I was slightly zoomed in. Press Cmd+0 to make sure you are zoomed to the default 100% size before trying other things in case this is also your issue.
(I am using Sublime Text 3)

LWUIT 1.4 Plain commands Vs. Styled commands with LWUITTheme.res

I've just started to develope an LWUIT MIDlet with standard LWUITTheme.res. I added 2 commands (Exit, Search) on my first form, but they appear with no style (black on white).
Instead, other 2 commands (Back, Details) on a second form, showed on Search command click, are rendered styled in white on blue, with a blue gradient background.
The first form has a BorderLayout, the second has no particular layout set.
Since I haven't changed commands style in my code, I would expect that their appearance be the same in the first as in the second form, and precisely as they appear in the second form.
Am I wrong?
After #Bhakki first reply, regarding SoftButtons, I've checked the {$LWUIT_FOLDER}/LWUITDemo/src/LWUITTheme.res file.
As you can see, both Command and SoftButton has in the .res file.
It seems that the commands in the first form are styled as Command, and those in the second form are styled as SoftButton.
But I added them in the same way in both forms.
Am I doing something wrong?
You created the first form before installing the theme. You need to install the LWUIT theme before you create components but after Display.init().