CustomTitleBar keeps getting reset to a huge height when reloading the program into Rad Studio - delphi

I have a small application which uses the Custom Title bar. In use I have no issues with it, but each time I reload the program into Delphi the title bar has grown in height covering everything else and has to be returned manually to the required height.
I saw this effect when running my code until I set the height in the resize event.
Is this normal operation or have I missed something?

I have found that setting the CustomTitleBar.SystemHeight to true resolves problem because my controls fit within the system Toolbar height.
I guess the issue remains if you want to extent the Toolbar height.

Related

MonoTouch.Dialog DialogViewController Rowheight not maintained when orientation change

In my Xamarin project, I have used DailogViewController.
Using this, I have set the root elements and height both.
When I run the application, it works fine and the height (35f) which I set.
But when orientation change, in debug console, I see 35f as row-height, but In View, it is bigger than 35f.
The first output is like below image which is correct,
But after orientation change, it is displaying bigger size, but in console, the value of row-height is displaying 35f.
Any help will be appreciated to resolve this discrepancy in UI.
I debug it out more, It is resetting its size to 63f.
After more debugging, I found out, if we are using "BadgeElement" class for creating cell with Image+text, then only it is happening. Any way to set static height for "BadgeElement"

Xcode: Autolayout not working correctly

I've got this weird bug in my application. When I load up my app on the simulator or an iDevice and I go to the pageControl page the layout is doing weird things.
I use the pagecontrol pages for a calendar view, so if I load it up I see this
That's all good, but when I scroll down (or up) the layout changes a bit
If the scrolling is done and I'm on the next page the layout readjust itself and is then in it's good state
So I don't know where this has gone wrong but of someone knows I would be very grateful!
I'm using auto-layout in this page and on every simulator size I get this same problem.
If you are using auto-layout to position the vertical line, then I suggest you base it's position off of the left side of the cell rather than the right side of the label to the left of the cell.

XCode 6 GUI Not Updating

I am using XCode 6 to make a simple calculator using Swift. Anyway, I compiled the code with the initial GUI and it works. However when I change the positioning of some buttons, it does not show up in the compiled app running on iOS simulator. Does anyone know what should be done?
Also, I've changed the code as well, and the code is updated. Ie, pressing button 1 will show 1 in the main textbox, but the interesting thing is the position of the button, which I have changed, still remains in the same position I set it to be initially.
How are you changing the positions of the buttons? If you're doing this by setting frames in code, and your original GUI is laid out in a storyboard, then you're probably fighting against auto layout.
Your storyboard layout will be driven by constraints, which determine the size and position of all the elements of your GUI. Setting a frame manually doesn't change these constraints, so the layout engine resets everything.
Either turn off auto layout (bad idea, since you now have to cope with every screen size manually) or move your buttons by adjusting your constraints.

IOS - How to get my text view object information to scroll on view?

I am using Mac OS X Lion 10.7.5 and XCode Version 4.6.1 (4H512),
I have looked at these answers on stackoverflow to try to figure out my question
-cannot make a text view scroll - xcode 4.3
-also posts that looked possible, when I searched on "scroll text in UITextView" within stackoverflow
Within Interface Builder I cannot figure out how to make information in a UiTextView object scroll within the iPhone simulator*. To resolve this challenge, I have made the most simple prototype project I can think of, just a view and one text view object on it, filling the text view object with a stream of text simply typed in via interface builder. For this most basic sample I'm using to sort out my problem, I have not done anything programatic. (Please note that I am aware of StoryBoards and have begun working through a book to learn to use them, but I would like to finish my first prototype app using what I’ve already learned and fully complete one project before I move onto my next project using StoryBoards.)
When I run this in the iPhone simulator, I see the sample information in my text view object come up. As I expected not all the information displays, due to my sizing the box a little too small on purpose. But I cannot flick or arrow down, or in any other way view the rest of the text information within the simulator. Nor do I see scrolling bars anywhere on the view. The information is just frozen in/on the view.
Inspector Settings
Identity Inspector
"Accessibility" Tested both with Enabled checked and not checked
Use Auto Layout is NOT checked
Attributes Inspector
Behavior Editable box not checked
Scroll View Area Checked ‘show horizontal scrollers, shows vertical scrollers and also scrolling enabled” The rest of the scrollers box are not checked
Bounces is checked
Zoom min and max are both 1
Touch all boxes checked- bounces zoom, delays content touches, cancellable content touches
View mode is ‘scale to fill”
Interaction ‘multiple touch’ is checked
Drawing checked opaque, clears graphics context, clip subviews, and autoresize subviews. Only ‘hidden’ is not checked
Size Inspector
I played around with the ‘scrolling insets’ boxes changing them from the default (I think it was 0 or 1), just to see if I noticed anything. I think maybe that I see some shadowy marker type lines in Interface builder in the area where I might expect a scroll bar when I make these changes, but no change in appearance within the simulator.
I cannot figure out why my actual iPhone device with everything up to date, is now not working as a test device, but I believe that is a separate challenge
how about wrapping you uitextfield in a uiscrollview. Make the scroll view the dimensions you currently are setting the uitextfield to, then allow your uitextfield to scale to the size of the text.
This is one of those questions that solved itself eventually. After twice creating the most basic app, with no programmatic bits just interface builder and a textView object with all the defaults the scrolling worked. The only reason I can think of that it might not have scrolled as expected the first time through may have had to do with placement of the textView object on the view. I wonder if it overlapped the bottom of the view and maybe that messes something up.
Just one of those situations where I had to keep plugging away, trying what seemed like the same thing repeatedly,set in the Inspectors, and suddenly, like magic, it worked. Except no magic involved.

TToolButton Height Grows with Style = tbsDropdown

I noticed that the height of a TToolButton increases when you set the button's Style to tbsDropdown. I can understand the width increasing, so the button has space to draw the down arrow, but I'm not sure a height increase is necessary.
Steps to reproduce the issue (Delphi 2010, Windows 7 x64):
Add TToolbar to a form, ShowCaptions=True
Right click to add a button to the Toolbar
Set button Style=tbsDropDown and notice the button grows in height
The same height increase happens when there are images assigned to the
toolbar, in which case there is already plenty more vertical space available
in the button to draw the drop down.
Here's a visual example:
alt text http://img440.imageshack.us/img440/1462/ttoolbar02.png
alt text http://img291.imageshack.us/img291/966/ttoolbar01.png
Is there a workaround for this without hacking the VCL, or is this hardcoded into the Windows control?
It's part of the underlying Windows control. A quick look into ComCtrls shows that changing the TToolButton.Style calls it's SetStyle method. If, in SetStyle, ShowCaptions is True then the TToolBar.ButtonWidth and ButtonHeight are both set to 0, and TToolButton.RecreateButtons is called.
RecreateButtons, in turn, calls TToolBar.ResizeButtons, which simply sends (posts) a message to the ToolBar using
Perform(TB_AUTOSIZE, 0, 0);
TB_AUTOSIZE is intended to be used, according to MSDN,
after causing the size of a toolbar to change either by setting the button or bitmap size or by adding strings for the first time.
Since SetStyle sets both the ButtonWidth and ButtonHeight to 0, this message would seem to be correctly sent.
Looks like something is wrong with the theme support in underlying windows control. Switch off the runtime themes (Project/Options/Application, uncheck "Enable runtime themes" checkbox), ignore the increased button heights at design time (Delphi IDE uses themes) and run the application - you will see normal heights of the toolbar buttons.

Resources