spacing

Change Spacing Between UIBarButtonItems in iOS 8

邮差的信 提交于 2019-11-30 01:02:36
问题 I have a UINavigationItem on my view controller , and I am trying to reduce the spacing between my two RightBarButtonItems . Here is some of my code: // Create two UIBarButtonItems let item1:UIBarButtonItem = UIBarButtonItem(customView: view1) let item2:UIBarButtonItem = UIBarButtonItem(customView: view2) var fixedSpace:UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.FixedSpace, target: nil, action: nil) fixedSpace.width = -20.0 // Add the rightBarButtonItems on

How to set the line spacing in a JtextPane?

落爺英雄遲暮 提交于 2019-11-29 16:49:57
First of all, i set the JTextPane like this: HTMLEditorKit editorKit = new HTMLEditorKit(); HTMLDocument document = (HTMLDocument) editorKit.createDefaultDocument(); JTextPane textPane = new JTextPane(); textPane.setContentType("text/html"); textPane.setDocument(document); and i want to set the line spacing in the JtextPane , this is my idea,but it can't work: SimpleAttributeSet aSet = new SimpleAttributeSet(); StyleConstants.setLineSpacing(aSet, 50); textPane.setParagraphAttributes(aSet, false); i was wrong? When you call textPane.setParagraphAttributes(aSet, false); it tries to apply line

iOS - UICollectionView spacing still there when set to 0 - How to set with no spacing between cells

谁都会走 提交于 2019-11-29 05:37:14
I have a simple UICollectionView which I have set with 0 spacing in InterfaceBuilder but when I populate the collection view with cells there is still some spacing. Is there something special and not immediately obvious that I need to do in order to actually see a collectionview cell with 0 spacing beyond setting it to have 0 spacing? Thanks. EDIT* some code: - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath { UICollectionViewCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath]; cell

HTML image bottom alignment inside DIV container

时光毁灭记忆、已成空白 提交于 2019-11-28 19:08:03
I have a div tag with a fixed height. Most of the images have the same height and width. I want to align the images at the bottom of the div so that they are nicely arranged. Here is what I have so far: <div id="randomContainer"> <div id="imageContainer"> <img src="1.png" alt=""/> <img src="2.png" alt=""/> <img src="3.png" alt=""/> <img src="4.png" alt=""/> </div> <div id="navigationContainer"> <!-- navigation stuff --> </div> </div> The CSS looks like: div#imageContainer { height: 160px; vertical-align: bottom; display: table-cell; } I managed to align the images at the bottom with display:

Qt widget (with layout) space. What is it? How to remove?

帅比萌擦擦* 提交于 2019-11-28 13:49:32
I have written a program that uses widgets as container (for other widgets). Because the contents of the container varies along the program life, the container widget has a layout associated to it so it resizes properly. The problem is that the container seems to consume some space. In the following program, I have reproduced the problem: I have a group with a few labels, where one of them is included in a container (the widget w -and its layout t- includes the label "what is that extra space?"). My goal is to get the spacing between all labels the same, regardless whether they are in

Change spacing of snaplines in Visual Studio

陌路散爱 提交于 2019-11-28 13:25:29
Is it possible to change the amount of space snaplines put between controls in a WinForms project in Visual Studio? For example, when I slide a textbox up to another textbox (one above the other), there's 6 pixels of space between the controls. I'd like there to be 5 pixels of space between them when they snap to each other. Thanks. EDIT: Thanks for all of the answers. I thought it might be helpful to summarize the approaches: Option 1 Set the Layout Mode to SnapLines (default) under Tools > Options > Windows Forms Designer > General and follow Igby Largeman's guidance in the accepted answer .

How to delete border spacing in table

懵懂的女人 提交于 2019-11-28 10:42:54
I have a table, first row is like <tr> <th>1</th> <th>2</th> </tr> I put a black background to "th". Now the 1 and 2 cells have some kind of border between/separating them... I had a look in source code and I think I found something: border-collapse: separate; border-spacing: 2px; This CSS code is listed in source code as "user agent stylesheettable" and I couldn't enable/disable it to test if this is the problem, but I tried and added the same code but with "none" and "0" parameters but it didn't help neither... Can somebody help and guide me where is the border from please? Your table be

Center text in div?

安稳与你 提交于 2019-11-28 07:09:38
I have a div 30px high and 500px wide. This div can contain two lines of text one under the other, and is styled (padded) accordingly. But sometimes it only contains one line, and I want it to be centered. Is this possible? SamGoody To center horizontally, use text-align:center . To center vertically, one can only use vertical-align:middle if there is another element in the same row that it is being aligned to. See it working here . We use an empty span with a height of 100%, and then put the content in the next element with a vertical-align:middle. There are other techniques such as using

How to adjust space between two UIBarButtonItem in rightBarButtonItems

≯℡__Kan透↙ 提交于 2019-11-28 06:46:19
I am using the following codes to add two button to self.navigationItem.rightBarButtonItems, and I think in iOS7, the space between two buttons are too wide, is there a way to decrease the space between these two buttons? UIBarButtonItem *saveStyleButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"save.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(saveStyle)]; UIBarButtonItem *shareStyleButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(shareStyle)]; NSArray *arr= [[NSArray alloc]

How to change an UILabel/UIFont's letter spacing?

末鹿安然 提交于 2019-11-27 11:19:58
I've searched loads already and couldn't find an answer. I have a normal UILabel, defined this way: UILabel *totalColors = [[[UILabel alloc] initWithFrame:CGRectMake(5, 7, 120, 69)] autorelease]; totalColors.text = [NSString stringWithFormat:@"%d", total]; totalColors.font = [UIFont fontWithName:@"Arial-BoldMT" size:60]; totalColors.textColor = [UIColor colorWithRed:221/255.0 green:221/255.0 blue:221/255.0 alpha:1.0]; totalColors.backgroundColor = [UIColor clearColor]; [self addSubview:totalColors]; And I wanted the horizontal spacing between letters, to be tighter, whilst mantaining the font