autosize

Grouped UITableView and horizontal margins

断了今生、忘了曾经 提交于 2019-12-12 09:53:43
问题 I have a grouped UITableView that was really designed to look nice in portrait mode for iPhone. Its cell subviews have autosizing set up so that they stretch in landscape mode, but this makes it a lot less aesthetically pleasing -- the cells just look too wide for their content. I'm now making it a universal app but on iPad the autosizing causes even more stretching and it looks just unacceptable. It would be ideal if I could make the UITableView's groups of cells have a fixed width (or a max

Autosizing Cells in UICollectionView (all in code)

Deadly 提交于 2019-12-11 14:59:56
问题 Using Swift-5.0, Xcode-10.2, iOS-12.2, There is an issue in my code while trying to achieve "autosizing" of cells in a UICollectionView (using UICollectionViewFlowLayout as its layout). The height of the cell is content-based (and unknown upfront) - therefore I try to get the cell's height to autosize (the "width" I don't care for now and can, for example, be set to frame.width ). Even tough, I only use one large UICollectionView-Cell for the example below, I would still like to keep

tab views on iPad not resizing

百般思念 提交于 2019-12-11 14:05:40
问题 My view doesn't stretch to fit the current orientation! I am creating a tab bar application. I replicated the sample one that you create when you "create a new tab bar application". Everything works except when I change the orientation of the iPad it rotates the view, the tab bar stretches out on the bottom, but the view doesn't resize. Basically if you start in landscape then rotate to portrait, it rotates but the view is still landscape shape even though it rotates. My tab bar has two tabs

C# AutoSize DatagridView Populated By Linq Query

浪尽此生 提交于 2019-12-11 08:18:28
问题 I have a datagridview control that is populated by a linq query: public static IQueryable SearchByDepartmentNameInfo(string deptName) { ExamineDataContext dc = new ExamineDataContext(); var queryResult = from q in dc.GetTable<Question>() where q.Topic.Module.Department.DepartmentName.Equals(deptName) join s in dc.Solutions on q.QuestionID equals s.QuestionID into qs // note grouping select new { Module = q.Topic.ModuleTitle, Topic = q.TopicName, Question = q.QuestionText, QuestionType = q

Prevent RowHeight = Auto from Stretching my Grid?

十年热恋 提交于 2019-12-11 07:49:54
问题 In my scenario, the end user customizes his or her user interface by breaking it into rows and defining the height rule for those rows (fixed, fill space, fit content). I implement this using the WPF Grid. The Grid starts filling the entire screen, and should not get any bigger - the user MUST be able to see the entire Grid at all times (scroll bars WITHIN rows are okay, but not scroll bars for the entire grid). The crux of my problem: When the user creates one or more "auto" sized rows, the

How to `wrap_content` while autosizing an Android TextView?

廉价感情. 提交于 2019-12-11 07:18:55
问题 Consider this layout: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/textView" android:layout_width="0dp" android:layout_height="0dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp"

NSLabel Autoshrink with top constraints

偶尔善良 提交于 2019-12-11 05:33:05
问题 I try to figure out autoshrink option in UILabel with regarding top constraint. I have UIView and three labels. One of them has autoshrink option on. It has constraint to be centered, and has Trailing and Top constraint which should shrink label when changing size of UIView. If I make UIVIew thinner, font size is decreased, but if I change height of UIView font is not changed. Constraints on UILabels : Align Center X to Superview Align Center Y to Superview Trailing Space to Superview >= 50

How to resize UIView manually/programmatically while iPhone is in phone call mode?

倖福魔咒の 提交于 2019-12-11 05:07:56
问题 In my map application the MapView controller is opens well in phone call mode. When I open detailView which is another UIView(subview) in same controller it does not get resize in phone call mode. I have followed Iphone- How to resize view when call status bar is toggled? the link also try to autosize my UIView but still the problem exist. My detailView is going out(down) of screen . Is there any other solution or I am missing something in code?? plz suggest.. Edit Actually my firstView

WPF Grid allow controls inside to auto size width/height

夙愿已清 提交于 2019-12-11 04:47:31
问题 Hey all i have been trying to find examples of how to go about auto sizing the controls i have within a grid control if the users screen is larger than the default size. Currently i am unable to resize the controls when i enlarge the form. Is there any code currently that can find all controls inside the grid and resize them on the fly when the form is resized? My current code is: <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http:/

react on the resizing of a QMainWindow for adjust widget's size

对着背影说爱祢 提交于 2019-12-11 01:11:58
问题 How do I react on the resize of a QMainWindow ? I have QTextBrowsers in a QScrollArea and I adjust them to the size of the content on creating them (the only thing that should scroll is the QScrollArea ). Everything works for now, but if I resize the mainWindow , the height of the QTextBrowsers isn't changed, because the reflow function isn't triggered. Do you have any better idea to adjust a QTextBrowser to it's content? My current code is: void RenderFrame::adjustTextBrowser(QTextBrowser* e