I'm trying to organizate my menu (which has many menuItem added) in 2 columns, this way it will be better for smaller computer screen to see.
I'm using smartgwt menu and I am adding this way:
m_menu.setItems(
m_itemSaude, v_separator, m_itemMSeguranca, v_separator,
m_itemMeioAmbiente, v_separator, m_itemTerceiros, v_separator,
m_itemInfra, v_separator, m_itemProjetos, v_separator,
m_itemSegOperacional, v_separator, m_itemRH, v_separator,
m_itemQualidade, v_separator, m_itemSuprimentos, v_separator,
m_itemComunicacao, v_separator, m_itemReceitasAlt, v_separator,
m_itemAdmin);
Is there any way to organize in 2 columns these menuItem?
I dont think you can do that with only one MenuItem, maybe you can try using two.
The other option is going full custom and build your own widget from scratch, but thats going to be a lot of work.
maybe you could take some inspiration from this sample:
http://www.smartclient.com/#menuEmbeddedComponentsNewSample
Related
I have customised a default ComboBox Style by using DataGrid in the popup (dropdown) as described here.
When I use the customised style in a ComboBox or in a DatagridComboBoxColumn, it works fine.
Similary when I use the style in the DataGridTemplateColumn.CellEditingTemplate, it works fine.
However, it does not work when used in a DataGridTemplateColumn.CellTemplate. The selection does not work at all. It is as if the selection changed event does not fire.
I tried setting the IsSynchronizedWithCurrentItem="False" in the ComboBox, still it does not work.
Funny enough when I use the default ComboBox style in DataGridTemplateColumn.CellTemplate, it works. It appears the problem is when Datagrid is used as an ItemsHost.
The reason why I want to use it in a DataGridTemplateColumn.CellTemplate is because I want to change the look of my application by not using the standard DataGridComboBoxColumn where the editing part is hidden and one has to dig deeper to exopause the comboxbox. I want the user to click once to select items from the combobox.
Similarly the DataGridTemplateColumn is wired in such a way that the CellEditingTemplate is underneath the CellTemplate (which is similar to the default DatagridComboxBox). What I want instead is to use the DataGridTemplateColumn.CellTemplate for both viewing and selecting (editing).
At the same time I don't want to use the default ComboBox Style by replacing the ItemsHost with a Datagrid. But the customised style does not work in a DataGridTemplateColumn.CellTemplate. It only works in DataGridTemplateColumn.CellEditingTemplate
Any dies?
I resolved it by inserting these two lines in the Datagrid
SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem}"
IsSynchronizedWithCurrentItem="False"
I'm working on an app that'll have a range of images and the collectionview is not showing up at all. I was following this article, which I translated to C#.
here is an example app I made to show a minimal example of what I'm trying to do.
When I run through the code, GetCell in the collection source isn't firing which I know is the problem, but I don't know why it's not firing and I'm simply at a lost on what I'm missing.
I test it again today and I can make sure that the problem is caused by the MosaicCollectionLayout.
What I did today is that I removed your collectionView and add a new collectionView, then I add Constrains to it with a fixed height and width(to make sure it appears even if there is no data), then I change the layout to FlowLayout, it works, here is the screenshot:
After that, I changed the layout back to MosaicCollectionLayout, I get an exception in the line _cachedAttributes.Reverse(lastIndex.Row, firstMatchIndex.Value); inside the method LayoutAttributesForElementsInRect.
I checked the article and did not find a solution yet. Maybe there is some mistakes in the codes translated from swift to C#. So the problem is not related to the xib, please check the code in the method LayoutAttributesForElementsInRect.You can also try add Constrains to your collectionView. Hope these information helps you.
I have a screen in my react-native app where I am showing details of a record. It's a pretty simple screen where on the left column, I have a label describing the item and on the right, I have the value of the item. For one of the values, I have to render a ListView and I am not able to properly align it. Below is the sample app on rnplay with the symptoms:
Sample app on rnplay
Please run on iOS. Here ComponentListView is a reusable component that I am using to render ListView and it takes a component and data as it props and render each entry in the data using the passed in component. Here the list is BackupList and the component to render in each row is BackupSummary. If you run the app, you will observe that the backups are not aligned properly. I ran it in the Inspector on the simulator and looks like the ListView starts from where Varun Accepted is seen. I am not sure why. Right now there is just one item in the this.props.backupContacts but there could be more. I have tried many different flexbox properties such as alignItems, justifyContent, alignSelf in order to get it to work with no success.
Please let me know if you know how to fix it.
Put your ListView inside a View and apply css on View, something like this
<View style={{display:'flex', flexDirection:'row', justifyContent:'center'}}>
<ListView/>
</View>
Getting started with xCode 4.6.3 and I'm running into a hiccup.
I've built a simple app using the UIWebView to display a local HTML file and it's contents. I used that to debug any issues with the HTML and/or image displays and I'm all set.
Now I need to recreate that within a larger project I've built with storyboards for all my navigations between multiple view controllers. My issue comes when I'm trying to control-click drag from the WebView into the ViewController.h code below the #interface like many tutorials show, and that worked fine within my smaller single view controller app. It won't do it. I know I'm missing something obvious here. Am I going to have the set up these screens (I have multiple ones to do this same way) as separate xib files and add them into my main project?
Thanks for any help and clarification.
-Chris
You can create a class called for example myWebViewController and in Interface builder add a UIWebView to it. The control+drag to the header file will work.
Every time you want a UIViewController that has a browser in it, define its class as myWebViewController in Interface Builder.
Try not to repeat code. If you see UIViewControllers or any other UIView...that do the same thing, you can group them into a class that you use over and over.
I am developing the following screen
The fourboxes next to each other are buttons. On clicking of the buttons I am changing the adapter of the listview.
Since the content above the listview took up lot of space I made the whole thing as an header and added it via code.
myPollsList = (ListView) findViewById(R.id.listArea);
myPollsList.addHeaderView(getLayoutInflater().inflate(R.layout.profile_listview_header, null));
Now I want to show some view when the list is empty. But if I do that then the header also goes away.
I am using this in a Activity and not a ListActivity. Any suggestions or workarounds for showing the header even when the list is empty ?
EDIT: Refer to my earlier question here ListView not getting space to show content on smaller screens . This is where someone suggested me to solve the problem by putting it as a header
I found a simple solution for this problem. If there's no elements for list and you are not adding the adapter, just add this:
mListView.setAdapter(null);
and the header will appear. It's easier than adding empty / fake item to the list.
So this is how I solved it. I had a custom adapter which was connected to the listview. When it found that it had zero items to display. It would add a fake empty view as an item to the list.
maybe you will like this Android addHeaderView disappears when no items in ListView
override/subclass your adapter to return false from isEmpty()
Don't use top layouts of button as header for list view.
So to adjust UI without using list header use weights.
Give parent Linear layout weight sum as 4 and 1, 1 to top Layouts and 2 for list view.