• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

QReport controls and margins

is there a way to obtain a margin inside a QRControl (a QRLabel for example)?  The problem is that framed QR controls with right alignment yield a display and print out where the text is sticked to the frame.

An horizontal margin spacing between the frame and the physical beginning of the text is the required behaviour. This margin could be from left of from right depending on the alignment of the text inside the control.

many thanks
fadyg
0
fadyg
Asked:
fadyg
1 Solution
 
ITugayCommented:
Hi fadyg,
seems no way. I have an easy solution:

write two procedures and assign all onClick event handler for

left-alligned controls to:

procedure TQuickReport1.QRDBText1Print(sender: TObject; var Value: String);
begin
  Value := '  '+Value;
end;

for right-alligned controls:

procedure TQuickReport1.QRDBText1Print(sender: TObject; var Value: String);
begin
  Value := Value+'  ';
end;

------
Igor
0
 
fadygAuthor Commented:
Hello Igor,

The problem goes beyond that. Your solution works fine with standard reports with a constant font size.  But if you change the font size between one control and the other, all alignment (left or right) is lost.  

What I'm looking for is a TQRCustomLabel descendant component that would introduce 2 new properties Horizontal margin and VerticalMargin that would express in terms of inches or millimiters.

thank you for your comment
fadyg
0
 
darkloserCommented:
ITugay :)) i use same but that's not a cool way.
what do u think about frame and wordwrap :)
Heh Bugland and spanish quickReport :))
Bugz forever :)
0
 
Russell LibbySoftware Engineer, Advisory Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To be PAQ/Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
 
PashaModCommented:
PAQ'ed and points not refunded

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now