Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - SetFormFieldAlignment for Button
  FAQ FAQ  Forum Search   Register Register  Login Login

SetFormFieldAlignment for Button

 Post Reply Post Reply
Author
Message
PeterAnderko View Drop Down
Beginner
Beginner


Joined: 03 Dec 20
Location: Slovakia
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote PeterAnderko Quote  Post ReplyReply Direct Link To This Post Topic: SetFormFieldAlignment for Button
    Posted: 09 Dec 20 at 7:59AM
Hi,

I tried to set the centered alignment for the new "formfield" that I created as a button for print.
here is a procedure: 

procedure CreatePrintButton(Menox:string);
var BTWidth,BTLocation:double;
    ix,strana:integer;
begin
strana:=1;
PDFDok.SetOrigin(1);
BTWidth:=45;
BTLocation:=91;
ix:=PDFDok.NewFormField(Menox,2);
if ix>0 then begin
   PDFDok.SetFormFieldCaption(ix,Menox);
   PDFDok.SetFormFieldAlignment(ix,1);
   PDFDok.SetFormFieldPrintable(ix,0);
   PDFDok.SetFormFieldBounds(ix,BTLocation,5,BTWidth,15);
   PDFDok.SetFormFieldFont(ix,PDFDok.GetFormFontCount);
   PDFDok.SetFormFieldTextSize(ix, 8);
   PDFDok.SetFormFieldBorderColor(ix, 0.9, 0, 0);
   PDFDok.SetFormFieldBorderStyle(ix, 0.2, 0, 0, 0);
   PDFDok.SetFormFieldColor(ix, 0, 0, 0);
   PDFDok.SetFormFieldBackgroundColor(ix,0.85,0.90,0.70);
   PDFDok.SetFormFieldValue(ix,'');
   PDFDok.SetFormFieldHighlightMode(ix,3);
   PDFDok.FormFieldJavaScriptAction(ix, 'U', 'this.print({' +
                                             'bUI: true,' +
                                             'bSilent: true,' +
                                             'bShrinkToFit: true,' +
                                             'nStart: ' + IntToStr(strana-1) + ',' +
                                             'nEnd: ' + IntToStr(strana-1) + '});');
   end;
end;

Despite setting up

   PDFDok.SetFormFieldAlignment(ix,1);

The alignment of the button caption (Menox) remains left-aligned. Confused
what I'm doing wrong?



Peter






Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store