I use the Fluent Ribbon (fluent.codeplex.com). I want to arrange four buttons side by side.
I use the following code:
<Fluent:RibbonGroupBox Header="Some Header">
<Fluent:RibbonToolBar>
<Fluent:RibbonToolBar.LayoutDefinitions>
<Fluent:RibbonToolBarLayoutDefinition Size="Small">
<Fluent:RibbonToolBarRow>
<Fluent:RibbonToolBarControlGroupDefinition>
<Fluent:RibbonToolBarControlDefinition Target="buttonFirst" />
<Fluent:RibbonToolBarControlDefinition Target="buttonPrevious" />
<Fluent:RibbonToolBarControlDefinition Target="buttonNext" />
<Fluent:RibbonToolBarControlDefinition Target="buttonLast" />
</Fluent:RibbonToolBarControlGroupDefinition>
</Fluent:RibbonToolBarRow>
</Fluent:RibbonToolBarLayoutDefinition>
</Fluent:RibbonToolBar.LayoutDefinitions>
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/First_16.png" x:Name="buttonFirst" />
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Previous_16.png" x:Name="buttonPrevious" />
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Next_16.png" x:Name="buttonNext" />
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Last_16.png" x:Name="buttonLast" />
</Fluent:RibbonToolBar>
</Fluent:RibbonGroupBox>
The buttons are aligned correctly, but the buttons don't have a image. Where is the problem?
(The image files are available)
Sometimes you need to change 'Copy to Output Directory" setting. I usually use 'Always'. Or IfNewer if you have a lot and don't want a rebuild to constantly wipe and recopy.
Related
i have this code, what i want to do on the tab prop is add Tooltip on the icon:
<Tabs.TabPane tab={<Tooltip placement="left" title="adasd"><Icon size="1.2" name="cog" /></Tooltip>} key="map">
<MapProperties onChange={onChange} canvasRef={canvasRef} />
</Tabs.TabPane>
i was expecting for the hover to show but it's not working. is it possible to add ant design tooltip on tabs pane?
Anuj's answer isn't correct since TabPane should be direct children of Tabs component. I also had such problem and I find out that i can solve it like this:
<TabPane
key="3"
tab={(
<Tooltip title="Your hint that appears after user's mouse will be over the tab title">
<span>tab title</span>
</Tooltip>
)}
disabled={mode === PageMode.NEW}
>
tab attribute accepts any ReactNode so we can just wrap our tab name with any component. And tooltip isn't exception.
Proof that this works
It should be like
<Tooltip title="foo">
<Tabs.TabPane>....</Tabs.TabPane>
</Tooltip>
https://ant.design/components/tooltip/#header
I am new using admin-on-rest framework, I need to make nested form working.
I have two models show and song.show() can have multiple songs. I have show edit form it will work as expected.
I need to add a song form inside show edit form, so I can add multiple songs for each show.
I tried all ways but i am not able to get it done.
This is my code:
<Edit title="Edit Show" {...this.props}>
<SimpleField>
<TextInput source="name" style={{ display: 'inline-block' }} />
//here need to add song add form without reloading page
//this is songs grid
<ReferenceManyField reference="songs" target="show_id" label="Set List" perPage={5} >
<Datagrid>
<TextField source="song_name" />
<EditButton />
<DeleteButton />
</Datagrid>
</ReferenceManyField>
//Here need to add song form, so i can add songs
</SimpleField>
</Edit>
How can I achieve this?
Not sure if that answers your question.. if songs pre-exist then you just need to do that:
<Edit title="Edit Show" {...this.props}>
<TextInput source="name" style={{ display: 'inline-block' }} />
<ReferenceArrayInput label="Songs" source="songs_property_on_show" reference="songs" allowEmpty>
<SelectArrayInput optionText="song_name" translate={false}/>
</ReferenceArrayInput>
</Edit>
if you want to create them on the fly while you are creating the show or in other words have a form inside the other this needs to be done in a custom way (using redux-form) as commented under my question: how to create an entity inside another in the same form using admin-on-rest?
I am new to AOR and redux-sagas and I am currently working on a list view drag-and-drop and upload capability. I want the user to be able to drag and drop files and see current upload progress and status from the List view.
The prototype of the component looks like this:
// ...
<Dropzone onDrop={this.onDrop} onDragLeave={this.onDragLeave} onDragEnter={this.onDragEnter} ref={(node) => {this.dropzoneRef = node;}} disableClick disablePreview style={{}}>
// Dropped files will appear here, with the upload progress
<Card style={{marginBottom: "1em"}}>
<CardTitle>Picture.jpg</CardTitle>
<CardText>
// The progress bar will show the upload progress
<LinearProgress value={50} mode="determinate" />
</CardText>
</Card>
<List {...props} actions={<FileActions onUploadClick={() => {this.dropzoneRef.open()}} />}>
<Datagrid>
<TextField source="name" />
<DateField source="createdAt" />
<EditButton />
</Datagrid>
</List>
</Dropzone>
the onDrop callback receives the dropped files, and that's where the upload needs to be handled. That's where I am bit puzzled about how I should handle the problem.
I understand I have to decorate my REST client in order to be able to upload my files. But how can I plug some functions in order to send the upload progress of each files to my component?
Hi I am relatively new to openui5. I am designing a login page. My form is designed with "responsive grid layout". In my form component I have a single "FormContainer". I want that container to be vertically center without any effect to my responsive design.
The following is the current screen shot:-
The code of my xml is as below:-
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:core="sap.ui.core"
xmlns="sap.m" >
<VBox class="sapUiSmallMargin" >
<f:Form id="Form"
editable="true"
ariaLabelledBy="Title1">
<f:layout>
<f:ResponsiveGridLayout />
</f:layout>
<f:formContainers>
<f:FormContainer ariaLabelledBy="Title2" >
<f:formElements>
<f:FormElement >
<f:fields>
<Image
src="icons/user.jpg"
densityAware="false"
width="60px" >
<layoutData>
<l:GridData span="L1 M1 S1" />
</layoutData>
</Image>
<Input value="{SupplierName}" id="name">
<layoutData>
<l:GridData span="L11 M11 S11" />
</layoutData>
</Input>
</f:fields>
</f:FormElement>
<f:FormElement >
<f:fields>
<Image
src="icons/password.jpg"
densityAware="false"
width="60px" >
<layoutData>
<l:GridData span="L1 M1 S1" linebreak="true" />
</layoutData>
</Image>
<Input value="{Street}" >
<layoutData>
<l:GridData span="L11 M11 S11" />
</layoutData>
</Input>
</f:fields>
</f:FormElement>
</f:formElements>
</f:FormContainer>
</f:formContainers>
</f:Form>
</VBox>
So kindly help me achieving this. How to vertically center the white box in the browser without effecting the responsiveness of the form?
You can center align the VBox by providing it height and using the property - justifyContent: center;
<VBox class="sapUiSmallMargin" height='100%' justifyContent ='Center'>
<!-- rest of the code remains same. -->
After I've added DatePickers to a simple form, all components got placed vertically, while I would prefer them to be placed horizontally. Is there any parameter that should be set to make this work, or I must play a bit with CSS?
<MuiThemeProvider>
<div>
<TextField hintText="Enter text"/>
<DatePicker hintText="Date from" container="inline" mode="landscape" />
<DatePicker hintText="Date to" container="inline" mode="landscape" />
<IconButton>
<img src="img/ic_search_black_24px.svg"/>
</IconButton>
</div>
</MuiThemeProvider>
Any suggestions are appreciated!
On each DatePicker, set the style to:
style={{ display: 'inline-block' }}