How to achieve "Center across selection" ? - ExcelJS - exceljs

I have went across the documentation where i couldn't find any Horizontal - "center across selection" alignment. I don't wanna merge the cells. Is there any way to do center across selection?
Center across selection

Related

How to create table view with rounded corners around the list items

I am trying to recreate a menu similar to the ones in the detail view of the iOS 13 Health app. Please refer to the marked up screenshot.
I know that this can be done with a table view. There's a section title and list items. But what I want to achieve is similar to the look shown in the screenshot whereby there's a background colour on the list items (not including the section title) and rounded corners at the top and bottom of the list.
Can anybody tell me how I can achieve this with the table view? Or point me towards the right direction? I already know how to setup table views and programmatically add the details. I just need help on how to achieve the styling as shown below.
Thanks!
So, I was able to figure it out. For the benefit of the devs who stumble in the same dilemma, I'm posting my solution here. But I will be tagging Glenn's answer above as the correct answer as it lead me to find the solution. Thanks again Glenn!
It appears that I didn't have to do anything special with my code. I just discovered that on XCode 11 and iOS 13, there's a new table view style called "Inset Grouped". You may set this property from IB or via code.
With a quick experimentation I was able to come up with the result as shown on the screenshot below.
It's not that complex to do. This one of the multiple ways that that style can be done.
a. You can use grouped tableView, as what you've indicated in the screenshot.
b. Provide section title, or better yet, a section view (for more customization!).
c. For each section, you have ONE tableViewCell.
d. For each cell of that c., you will have a tableView.
e. For each tableView of that d., you will have your a new cell of course (item cell).
f. How to compute for the height of the tableView of e.? There are multiple ways.
Provide static height (if your number of items are static).
If dynamic count, but you have constant height of each cell, then you can just compute it like so: itemsCount * heightConstantOfCell
If again you have dynamic count of rows/items, and you have iether constant height of each cell or dynamic height of each cell, then you can observe the frame key of the whole tableView.
g. Finally, just add some corner radius to each container view of your tableView in d..
Note, this screenshot ONLY shows the item g.. It's merely a corner radius of each container view of your tableView in a tableViewCell that is a cell of your main tableView.
Another way is to use UICollectionView, but kinda more complex than what I've discussed - at least for me.

What's the best way to implement a vertical timeline - iOS

First of all, apologies if this question isn't meant here. I searched a lot but didn't find anything.
What is the best approach to create a vertical timeline kind of view?
I tried implementing via UITableView by alternating cells but that approach is very messy in terms of autolayouting (had to disbale autolayout and apply programtically when creating cell on alternate side), thereofre isn't working properly (getting stuck while scrolling). This is what I achieved:
I want to achieve something like this, which is also easily manageble:
Please Suggest. Thanks!
I would have 1 cell row with two image views. One on the left, one on the right. I think this would be easier to use auto layout.
Then you can hide the image view and labels that shouldn't be used.

Scroll bars on DB grids - seeking a definitive approach

I see lots of DB scroll bar questions, but never seem to find a definitive answer to this one.
There is no option (property) to add/hide DB grid scroll bars, either singly or jointly. The simply auto-appear when needed.
If I don't have enough rows to scroll, I would like my columns to fill the entire grid.
If I design it so then when a vertical scroll bar is added at run-time a horizontal scrollbar is auto-added too (since I just covered the right part of the right most column with a vertical scroll bar, we now need a horizontal scroll bar to see what I am covering).
One option is to design my grid such that there is enough space at the right hand size (how many pixels?) to accommodate a vertical scroll, but that is unsightly until there are enough rows to trigger a scroll bar (if ever).
It seems to me that the most aesthetically pleasing way would be start with a grid which is filled with columns at X pixels wide and increase its width to X + width of vertical scroll bar (or decrease the width of one/some of the grids columns by a total of width of vertical scroll bar) pixels when adding a new row causes the vertical scrollbar to appear.
Am I missing something? Is there a “correct” way to do this, or an industry standard way (I am not asking for a “best” way or anything too subjective, so please don’t close. I believe that a lot of people need to know this).
Is there anything in the standard TDBgrid to facilitate this?
Bonus: I subscribe to TMS components, so if there is a way to do this simply with TAdvDbgrid, that would be fine for me, but a general solution with TDBgrid would be fine.
Non-subjective question: Given that
- I do not want to increase the width of my TDBgrid
- and that I do not want a blank white column at the right when no vertical scroll bar is present
- and that I am willing to decrease the width of my right-most column in order to avoid a horizontal scroll bar appearing when a vertical scroll bar appears
... how do I do so?
[Update]
Ken was rightly awarded the answer becuse his solution is best for most users.
For those like me who already paid for a TMS subscription, I just noticed that their TDbAdvgrid component has a ScrollBars property and when I set it to ssVertical, it does what I want.
Now, if I could only figure out a good way to have fixed header row when it is the only row ...
TJvDBGrid (part of the JEDI JVCL) has this capability built in, and includes source code. It should be able to either do what you need, or give you the details needed to implement your own descendant.

iOS Horizontal Menu w ScrollView

I want to make a horizontal scrollview menu like top of picture at bottom.(NEWSLETTER, CITY, WOMEN etc.) I'm researching for two days. But i didn't find a solution for my problem.
This menu must can loopable. Selected item will be at center of screen. And have a effect like paging. But when i pagingEnabled on scroll view it's making pages for every frames. I want a page each menu item.
Someone can give me some idea?
Thank you.
There's some decent options out there for wrapping the content in your UIScrollView. Check out: Make UIScrollView wrap around.
Also take a look at this github project: https://github.com/jonah-carbonfive/WrappingScrollView

iOS UILabel Formatting Tips

Does anyone have any tips or suggestions for working with labels in iOS? I am a newbie learning to develop on iOS and come from .NET world and find it extremely hard to achieve the look I need in a custom table cell I am designing.
Basically I have a custom table cell that has two labels. One for title and second one for sub title. I want my title label to hold at most two lines of text and truncate tail of longer text. For my subtitle label I want 3 lines of text. My title label will be bold and my subtitle label will have one level smaller fonts.
The only thing I am struggling with is the label heights. How to drop labels in XCode so that they accomodate two lines of text at most (and handle single lines of text gracefully) and do the same for my subtitle label.
There may be a simple solution to this but I am missing it completely. I cannot believe a simple act of dropping the most basic UI component can be so complex in iOS. I don't want to do any hacks (i.e. drop UI Views in the cell etc) if I can avoid it.
Any help will be appreciated.
Here's a couple of tutorials that may help you with custom UITableViewCells:
http://useyourloaf.com/blog/2011/2/28/speeding-up-table-view-cell-loading-with-uinib.html
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
Hope that helps
You might want to check out the default UILabels on UITableViewCell. They are textLabel and detailTextLabel respectively. Find the relevant Apple docs here.

Resources