Scrollbars and align to client in a nested form - delphi

My app has a form - which is used to design other forms and contains an Object Inspector (bas ascii art follows)
-----------------------
|obj | design forms |
|insp| here |
| | |
-----------------------
so, the app''s main form contains the object form and another form onto which components can be placed (there's also a toolbar at the top to select components, but I haven't shown that).
Now, If I make the main form larger, I would like the contents to expand to fit it ...
-------------------------------
|obj | design forms |
|insp| here |
| | |
| | |
| | |
-------------------------------
so my "form designer" form has Align := alClient;
but, if I place a component on it, so that it overlaps the edge ...
-------------------------------
|obj | design forms |
|insp| here -----------
| | |component|
| | -----------
| | |
-------------------------------
the screen of course shows
-------------------------------
|obj | design forms |
|insp| here -----|
| | |comp|
| | -----|
| | |
-------------------------------
and I would like an auto scroll bar.
But, it seems that Align := alClient; overrides AutoScroll := true;
Any idea how to resolve this conflict?
1) the designer area should shrink and grow, always filling the right part of the main form as the main form is resized
2) if a component is placed which would overhang the edge of the designer form then it should grow scroll bar(s)
OR am I totally missing the point? I have code that handles the placing of the component - should I be checking there if I need to add scrollbars?

I think a relatively easy solution would be to switch the form's Align to alNone and position and size it on the parent form's resize event. Presumably you've got a splitter in there whose size events you would also have to listen to.
So long as you only have the inspector and the design form then that's a pretty simple solution to implement. If you have more tool windows in there then it would get more tricky but the basic idea can be extended.

Related

Present a view above the navigation bar but below some other screen content

Currently I have a navigation stack, which is displaying a view. It has a subview floater that takes up a portion of the screen, like so:
+--------+
| navbar |
+--------+
| |
| |
| |
| |
| |
+--------+
|floater |
+--------+
Now, I want to present a view infoSheet modally that animates from the bottom of the screen; eventually, its final state should be behind the floater but in front of the navigation bar, like so:
+--------+
| |
| |
| info |
| Sheet |
| |
| |
| |
+--------+
|floater |
+--------+
I understand if we just want to present something in front of everything else in the window, we have some ways to do it, such as adding the infoSheet as a subview of the navigationController.view. However, since we also need the floater to be in front at all times, including when the infoSheet is animating into view, I believe that approach wouldn't work.

CollectionViewCell out of CollectionView

I implemented an animation that increases the scale of the chosen cell in the collection view, the problem is that when I increase it, the bounds of the collection view cover the cell.
The scenario I'm facing is this:
BEFORE: AFTER:
____________ ____________
| ___ | |_____ |
| (___) | | \ |
|____________| |_____/______|
But this is what I want in fact:
BEFORE: AFTER:
____________ ____________
| ___ | _|_____ |
| (___) | / \ |
|____________| \_______/______|
where the big rectangle is the collection view and the small figure, the collection view cell.
in a nutshell, I want it to be possible for the cell to appear outside the collection view.
How can I do that?

How to get TActionMainMenuBar drop down items to scroll when there are too many items to show

Does anyone know how to get a TActionMainMenuBar with TThemedPopupMenu to act like the standard menus, in that if there is too many items to fit on the screen (vertically), two scroll buttons appear (one top, one bottom)?
I have tried:
Setting TActionMainMenuBar.Orientation to boTopToBottom and TActionMainMenuBar.AllowScrolling to true - This makes the bar on the form to have scroll bars and you can't actually see the top items.
It sort of looks like this:
+---------------------+
| ^ |
| v |
+---------------------+
Instead of something like this:
+---------------------+
| File |
+---------------------+
Setting TThemedPopupMenu.Orientation to boTopToBottom and TThemedPopupMenu.AllowScrolling to true. This has the effect of squishing the dropping down menu horizontally, with icons and short cuts drawn on top of each other.
The reason for setting these properties is because TCustomActionDockBar.SetAllowScrolling is only set to true when "AllowScrolling and (Orientation = boTopToBottom))"
The only reference on the Internet I have found about this type of thing is Brian Long's "Actions, Action Lists And Action Managers"
Does anyone know if it is possible to get Action Managers to scroll vertically? or are there any references that might help me out?

Custom SplitViewController with two UINavigationViewControllers Status Bar issue

I have a custom SplitViewController which contains two UINavigationViewControllers. They are aligned like this:
Portrait Landscape
__________ _____________
| | | C | |
| NavCo1 | | o | NavCo2 |
|________| | 1 | |
| | |___|_________|
| NavCo2 |
|________|
The problem on iOS 7 UINavigationBar for NavCo2 doesn't cover the status bar which you see in the second screenshot:
I looked at the frame of both UINavigationBar and the seem the same. I use topLayoutGuide to align them and couldn't find any difference in the two navigation controllers or the view controllers they contain.
Edit:
Looking more into it, it seems that UINavigationBar.barPosition is set to UIBarPositionTopAttached. The problem is this is set over the UIBarPositioningDelegate which can't be changed on UINavigationViewControllers: "Cannot manually set the delegate on a UINavigationBar managed by a controller."

Tabs are scrolling in blackberry

In application i have six tabs. My problem is when i scrolls screen my tab also scrolls but i want tabview to be fixed. Tabs should always be visible.
Starting Screen is:----
After scrolling is:-------
Below share verse button i have displayed ads to view these tabs i need to scroll down. When i scroll down screen look like above image.
Any suggestion would be appericiated. Please let me know where i am doing wrong.
Thanks.
This is what you have now:
MainScreen's default manager (with scroll)
---------------------
| ----------------- |
| | TABS | |
| ----------------- |
| |
| ----------------- |
| | Other things | |
| ----------------- |
---------------------
This is what it should look like:
MainScreen's default manager (without scroll)
------------------------
| -------------------- |
| | TABS | |
| -------------------- |
| |
|VerticalFieldManager |
| -------------------- |
| | Other things | |
| -------------------- |
------------------------
When you are adding things to a MainScreen, you are actually adding it to a VerticalFieldManager that is created behind the scenes in the screen constructor. This manager has scroll by default, but this can be customized in the super call:
public class MyScreen extends MainScreen {
public MyScreen(){
super(Manager.NO_VERTICAL_SCROLL);
}
...
}
Now what you need to add to the screen is your tabs manager, and finally add every other field to a VerticalFieldManager with scroll.

Resources