Layout FastReport - delphi-7

I am creating a report in Fastreport 5.
How do I put all records of the detail band within a rectangle
without showing the horizontal lines between the items?
In QuickReport it was simple, just configure the properties of the band frame:
Frame.DrawTop: = True;
Frame.DrawLeft: = True;
Frame.DrawRight: = True;
Frame.DrawBottom: = True;
In this way the band had a contour.
This does not work on FastReport, so I'm drawing the rectangle inside each band, but the detail band does not behave as expected, ie without the lines between the record

A member of Embarcadero named Alan Glei help me with this answer:
You can add a blank text box, enable the Left and Right borders, mark the alignment of the same as client, and send it all back. With this you should have the look you want. Congratulations! It's solved.

Related

JavaFX MouseEvent not firing inside ScrollPane (above ~15 pixels)

Original Question
Progress to answer below
I want to have some thumbnails inside a ScrollPane. The thumbnails highlight when you mouse-over them.
The problem is, unless I apply scrollPane.setPadding(new Insets(15,0,0,0));, the listeners I have applied, (as well as the listeners for other controls such as Buttons) DO NOT FIRE. They only fire if the mouse is ~15 pixels below the top edge of the ScrollPane.
A. Shows no padding applied. (Red area shows approximate listener firing zone)
B. Shows 15px padding applied.
I was constantly clicking in both images. The Buttons only respond below ~15px too.
So unless I have padding, you cannot interact with any controls along the top, buttons, labels etc.
How can I get around this, please?
The scrollPane is constructed by:
parentStage = stage;
parentScene = scene;
mainStyle = mS;
backgroundStyle = bS;
highlightBackgroundStyle = hBS;
selectionPanelRoot.setCenter(selectionScroller);
selectionPanelRoot.setBottom(bottomButtons);
bottomButtons.setLeft(generalButtons);
bottomButtons.setRight(moreButtons);
selectionScroller.setContent(selectionContent);
selectionContent.setPrefWrapLength(Double.MAX_VALUE);
selectionContent.setHgap(10);
selectionContent.setVgap(10);
//selectionContent.setPadding(new Insets(15,0,0,0)); //<-- Uncomment to achieve what is shown in Image B.
selectionScroller.setMinHeight(280);
selectionScroller.setPrefSize(Double.MAX_VALUE , Double.MAX_VALUE);
The thumbnails consist of:
mediaPanel = mSP;
parentStage = stage;
parentScene = scene;
mainStyle = mS;
backgroundStyle = bS;
highlightBackgroundStyle = hBS;
root.setPrefSize(100, 140);
//root.setOpaqueInsets(new Insets(10, 10, 10, 10));
root.setTop(topInfoRow);
root.setCenter(view);
root.setBottom(keySelector);
topInfoRow.setLeft(timeLabel);
topInfoRow.setCenter(testButton);
topInfoRow.setRight(closeButton);
closeButton.setAlignment(Pos.CENTER_RIGHT);
closeButton.setGraphic(closeButtonView);
view.setVisible(true);
view.setFitWidth(130);
view.setFitHeight(100);
keySelector.setEditable(false);
keySelector.setFocusTraversable(false);
keySelector.setText("No Key");
Progress
I have made a bit of progress with answering this question.
The scrollPane is actually added to a BorderPane layout, right in the "Centre". By default, there are margins between components in the BorderPane (I don't know how to change this!). But if I simply add in something to the "Top" of the BorderPane, the problem is resolved.
The BorderPane Layout:
Seemingly, adding something in the top pushes down the scrollPaneby the ~15 pixels which are causing the problem. So it's as if originally the scrollPane was occupying the area at the "Top" which it shouldn't have been doing so.
After Adding some Text to the "Top"
(This is a longshot but I'm assuming you're looking for clues, rather than a fixed code - since you went for screenshots rather than MCVE, as others say.)
I would look outside your scrollPane code, at how the scene is set up and how java code and CSS interact (ifterfere?). Padding is set by both Java code and CSS. Even if you don't set CSS there appears to be some predefined styling applied by the browser.
See this, for example:
JavaFX: Cannot set font size programmatically after font being set by CSS
(Sergey Grinev's answer)
The JavaFX CSS implementation applies the following order of precedence; a style from a user agent style sheet has lower priority than a value set from code, which has lower priority than a Scene or Parent style sheet. Inline styles have highest precedence.

vba power point changing image border color on click

I'm trying to make an educational interactive presentation for kinder children using Power Point, and I'm trying to do a kind of test/activity in which the children have to click on some pictures according to the question. Some will be right, some don't. (for instance: can you point the tools used by a fireman? and show 4 images of different tools)
Using the mousemove event, I can reproduce a sound that says the name of the object, and using the click event I can reproduce another sound to tell the children "wrong" or "right".
Now, I would like to change the border of the picture they are clicking on (color and or width), but I have no clue how to do it in VBA.
It must be very easy, but I don't know the sintax :-(
Any help? Please?
Thank you!
You would be surprised but it's not so easy as you expected, of course, when doing smartly with classes and events.
I'll give you simple idea, so if you have time and really need it you could go this way. But there would be some problems- you will have to figure out how could you get starting borders of your shapes.
Here is idea how to start.
name each of the shape on the slide- select one and run the following instruction in Immediate window in VBA editor, eg.:
ActiveWindow.Selection.ShapeRange.Name = "Fireman"
to change the color and line write macro for each shape (this will run only in slideshow view):
Sub FiremanClick()
With SlideShowWindows(1).View.Slide.Shapes("Fireman").Line
.Weight = 2
.ForeColor.RGB = RGB(255, 0, 0)
End With
End Sub
in application right-click fireman shape and associate action with macro you wrote.
you will need to figure out how to set back standard setting of each shape and when.
For some reason, some kind of bug happens when setting the border shape color first and then the weight, the shape border color becomes the generic blue one in PowerPoint 2010.

Masking area where I can draw text?

My game has online highscore, and I present this in a page that contains a top row containing a back button and a title. The rest of the page is used for the top 10 scores.
Problem is that in landscape mode the screen only contains 9 of the 10 elements. So I implemented dragging so the user kan drag the list up and down to see the whole list.
But by dragging the list upwards it's items gets under the back button and the title. Can I somehow mask away the list for every item above y=80?
The back button and title is a png with transparent background so it does not look good at all :-/
You can do it by sccisor rectangle clipping or changing your camera viewport...
a. You can change the viewport
GraphicsDevice.Viewport = yourCamera.Viewport;
GraphicsDevice.Viewport = new Viewport(yourClippingArea);
b. You can use an scissor rectangle... setting a rasterizer state with scissor test enabled...
GraphicsDevice.ScissorRectangle = yourClippingArea;
GraphicsDevice.RasterizerState = new RasterizerState( ) { ScissorTestEnabled = true };

Table, rectangle placed on top of an image is not coming properly in preview mode in SSRS

I wanted to draw a rectangle with rounded corners in SSRS. But, after lot of research i got to know that currently there is no property for that. So, i am trying to use an image of a rectangle with rounded corners and on top of that trying to align the table and other controls within the image. But, when i am previewing it or exporting it to a PDF file, first the image is getting displayed, then below that all other controls comes. Am i doing anything wrong. Please let me know.
Why don't you try to enclose your image rectangle and other controls etc. within an SSRS Rectangle with BorderStyle = None...
Try following:
Create an image (the rectangle with rounded corners) in your favourite image drawing program. I did mine in Microsoft Paint
and save it as JPEG.
In SSRS report design, in Report Data pane, right click on Images >> Add Image and point to the image that you created in Step 1. (Untitled, in my case see the fig. below)
In SSRS report design, add a Rectangle from the Toolbox to the design surface and in the Properties Pane:
a) look for the BackgroundImage property Click its + sign. then
b) Enter values for Source as Embedded, BackgroundRepeat as Clip and the Value property , when you click the dropdown for its values, should show you the name of the image that you embedded in Step-2, select this name
Resize your rectangle to fit the shape and add your items to this rectangle.
EDIT:
Regarding the question in the Comment, I don't think that the size of the image rectangle can be increased dynamically. If that's the case then you may need to find some other work-around
HTH

Puting a BoxSizer in the middle of its panel

I've written some code which displays a wx.Frame, within which there is a wx.Panel, within which there is a jpg. The jpg is the same size as the frame, so that when the program starts up the user is presented with a picture covering the whole of the window. Overlayed over the top of this picture, and in the centre of the panel I want to put a wx.BoxSizer containing various widgets. So far I've got the sizer visible but, try as I might, I cannot shift it from the uppermost lefthand corner of the panel to the center. No doubt there are many round-about ways of doing this involving grids and borders, but before I set off down this path, I was wondering if I'm missing something simple and there is a command that can be used to position in widget in a specified part of a panel.
ps. I also know I could do this using absolute positioning, but I want to be able to resize the window while keeping the sizer at its centre.
Normally, you can't see a sizer. But regardless, you don't really center a sizer. You center the widgets INSIDE the sizer. So when you add a widget to the sizer, you'd want to do something like this:
mySizer = wx.BoxSizer(wx.VERTICAL)
mySizer.Add(widget, 0, wx.CENTER|wx.ALL, 5)
Now, that will only center it horizontally. If you want it in the very center of the panel, then create another BoxSizer that is oriented horizontally and add the first sizer to the second one, centering it too.
hSizer = wx.BoxSizer(wx.HORIZONTAL)
hSizer.Add(mySizer, 0, wx.CENTER)

Resources