GridRowDragger in Vaadin 21 missing? - vaadin

I'd like to use this "Drag and Drop Reorder of Rows in Grid"-code in Vaadin 21: https://demo.vaadin.com/sampler/#ui/drag-drop/grid-reorder-rows-html5
Unfortunately I don't find the com.vaadin.ui.components.grid.GridRowDragger<T> class in Vaadin 21.
Is there any replacement / substitution?

Related

Reindeer.BUTTON_LINK in Vaadin 8

I am trying to have button which looks like a link in Vaadin 8.2.0. I am developing in Netbeans 8.2. I found this piece of code:
Button btn = new Button("Click Here");
btn.setStyleName(Reindeer.BUTTON_LINK);
But, it seems that in Vaadin 8 there is not such a Reindeer class. Is there any alternative?
Alternatively: ValoTheme.BUTTON_LINK
See Javadoc.
BaseTheme.LINK_STYLE should work in v8

Change progressbar color

I have a progressbar in my form and I need to change its color. I need it to be Yellow and so I am using this code:
SendMessage(ProgressBar5.Handle, PBM_SETBARCOLOR, 0, clYellow);
I am using Lazarus and I couldn't use the SendMessage(); procedure. Then I have googled a bit and I found that I need to include in the uses the lclintf library.
Now I have another hassle because Lazarus can't recognize the parameter PBM_SETBARCOLOR. In fact it states:
unit5.pas(245,50) Error: Identifier not found "PBM_SETBARCOLOR";
I see that the first line of code that I wrote is the only way to change the color of a ProgressBar from green to the one I need.
Any help? I am using the latest version of Lazarus.
The PBM_SETBARCOLOR is declared in the commctrl.pp unit of freepascal, same as in Delphi.
You could also declare it as a constant with value 1033 (WM_USER + 9).

TabBar whose style can be changed dynamically based on JvTabBar

I have tried many different libraries, but none came.
None of them can not be specified without introducing his own style in Painter.
I need to be able to quickly and dynamically change the style tab.
In response, I showed my developments.
If someone has similar developments - write them in response.
I decided to upgrade the simplest of them: TJvTabBar of JVCL (latest revision: 13415)
Here is the result.
Before (default)
After
Style sources (All graphics imported from png files with transparency)
Easy apply any personal style to any JvTabBar
var tmp:TStrings;
begin
tmp:=TStringList.Create;
tmp.Values['TOP_background']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-TOP_background.png';
tmp.Values['TOP_active_left_side']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-TOP_active_left_side.png';
tmp.Values['TOP_active_right_side']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-TOP_active_right_side.png';
tmp.Values['TOP_active_center']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-TOP_active_center.png';
tmp.Values['BOTTOM_background']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-BOTTOM_background.png';
tmp.Values['BOTTOM_active_left_side']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-BOTTOM_active_left_side.png';
tmp.Values['BOTTOM_active_right_side']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-BOTTOM_active_right_side.png';
tmp.Values['BOTTOM_active_center']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-BOTTOM_active_center.png';
tmp.Values['CLOSEBUTTON_normal']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-CLOSEBUTTON_normal.png';
tmp.Values['CLOSEBUTTON_selected']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-CLOSEBUTTON_selected.png';
tmp.Values['CLOSEBUTTON_disabled']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-CLOSEBUTTON_disabled.png';
tmp.Values['CLOSEBUTTON_closing']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-CLOSEBUTTON_closing.png';
tmp.Values['CLOSEBUTTON_modified']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-CLOSEBUTTON_modified.png';
tmp.Values['CLOSEBUTTON_closing_modified']:= ExtractFileDir(Application.ExeName)+'\skins\default\tabs-CLOSEBUTTON_closing_modified.png';
JvTabBar1.StyleImages:=tmp;
tmp.Values['BOTTOM_background']:= ExtractFileDir(Application.ExeName)+'\skins\default\MYMOD_tabs-BOTTOM_background.png';
JvTabBar2.StyleImages:=tmp;
Main changes
Added ability to specify their own style ( JvTabBar1.StyleImages )
Added the ability to move the close button to the right ( JvTabBar1.CloseButtonRight: = true or false )
Many fixes to the size and position of text / icons / buttons / scroll
My JvTabBar.pas mod You can download it here http://pastebin.com/JmbufHy0
And example source style + JvTabBar.pas http://www.sendspace.com/file/shhuzr

wkhtmltopdf automatic page breaks

I'm using wkhtmltopdf v0.11.0 rc1 in a Rails application through wicked_pdf (I know wicked_pdf does not support the new command line parameter notation, I'm using my own fork of the gem). I thought that content not fitting within a page should automatically overflow to the next one, but this is not the case - I'm seeing text just being cut off, sometimes in the middle of a line.
I know I can layout my pages using page-break-after:always, but this looks like dirty hard-coding, and besides the HTML comes from an ERB template so it's not always obvious where to put page breaks.
Can something be done so that page breaks are inserted automatically? Am I missing something about how this works?
Here's what the generated command line looks like
\"c:/program files (x86)/wkhtmltopdf/wkhtmltopdf.exe\"
--header-html \"file:///C:Users/bleak/AppData/Local/Temp/campaign_report.header.pdf_pdf_1580_0.html\"
--footer-html \"file:///C:/Users/bleak/AppData/Local/Temp/campaign_report.footer.pdf_pdf_1580_0.html\"
--margin-top 20 --margin-bottom 15 --margin-left 5 --margin-right 40
--page-size \"A4\"
page \"file:///C:/Users/bleak/AppData/Local/Temp/campaign_report_cover.pdf_pdf_1580_0.html\" --disable-javascript
toc --xsl-style-sheet \"c:/work/morizo/admoney/app/views/layouts/campaign_report.xsl\" - -
It turned out that this was happening due to fixed sizes on divs used to wrap document sections:
div.page {
width: 180mm;
height: 277mm;
overflow: hidden;
page-break-after: always;
}
Once I removed width and height, auto breaking started working as expected. Simple.

AG_E_PARSER_BAD_TYPE error when using DataForm control in Prism/silverlight 3

I'm using prism and SL3, as soon as I drop a DataForm Control in any modules, I get this error:
AG_E_PARSER_BAD_TYPE [Line: 6 Position: 31]
at System.Windows.Application.LoadComponent(Object component, Uri
resourceLocator)
at HelloWorldModule.Views.HelloWorldView.InitializeComponent()
at HelloWorldModule.Views.HelloWorldView..ctor()
I don't get this error if I drop the DataForm control in my Shell.xaml, only if I drop in any views in the modules. Can anyone shed some light?
You need to add Microsoft.Windows.Controls to your ModuleManifest.xaml..
Yes...you need to add reference of the dll. It worked for me.

Resources