Its about appointments' height in Infragistic's UltraMonthViewSingle control. In my code, it overlaps appointment in single day after increasing height of it using CreationFilter. So for more, can you look into this link please.
[http://www.infragistics.com/community/forums/p/86148/429648.aspx#429648][1]
Thanks a lot.
An appointments on UltraMonthViewSingle overlaps each other since i
have increased the height. Can you modify this creation filter in
order to remove unnecessary overlapping of appointment or Can you
write another one which can work for me?
The mentioned behavior is expected, because when you increate the height of your first appointment, you didn`t change the Y location of your second appointment. In your scenario you should modify your code (for example Rectangle(editor.Rect.X, editor.Rect.Y, editor.Rect.Width, 35) ) and add additional value to Rect.Y depending of number of your current appointment per day
I want to have non-bold text on every appointment in UltraDayView for
both Day view and Work Week View. Is it possible?
There are different approaches to solve this task. Maybe the easiest way could be if you are using AppStyle with desired look and feel. Another possible approach could be if you change VliewStyle of your UltraCalendarLook. The third option could be if you implement DrawFilter.
Let me know if you have any questions.
Related
I have a set of pages that look like this:
I have the content in grids with * Heights and Widths so the grid correctly scales when the entire window resizes. I would like the text to resize with the grid. Basically I would like the user to resize from this:
To this:
(preserving white space)
One way to do this would be to wrap the TextBlock in a ViewBox with margins on the right and bottom (for Grid.Row="3") to account for white space. But because I have several pages with different lengths and line counts I would have to set the margin specifically for each page otherwise the text sizes would differ on each page. Is there a better way to do this??
I don't think there is a better way to do this. There are different ways. But, I think it isn't just a matter of opinion that they would not be better.
Ways I can think of.
Render your text offscreen, rendertargetbitmap that so you've got a picture. Change your textblocks on screen to images and stretch them.
Or
Work out the size your text wants to be. Then do some calculation comes up with a different fontsize which is "better". This is a lot easier to write a description of than do.
In my opinion.
A viewbox is easier to implement. Way less error prone than calculations. Will give at least as good results as rendering to a picture.
I just want to add one more solution to the ones suggested by Andy, which is more of a scientific approach and takes a bit of practice to master.
Suppose you have to find a function F, which maps one or more variables to a desired single value. In your case that would be a function F, which takes aspect ratio of the window as input and outputs an appropriate font size.
How can you find such a function?
Well... you don't need to do any math yourself!
First, you need some data to begin with:
1. Resize the window randomly
2. Calculate aspect ration (X)
3. Pick an appropriate font size that looks good enough (Y)
4. Repeat the measurement 7 to 10 times (sorry data scientists)
5. Enter the data in Excel - one column for X and another one for Y
6. Insert a scatter chart
7. Choose the best trendline for your data, but avoid the polynomial one
8. Display the trendline equation and use the expression in your code
Now I should mention the pros and cons of this regression technique.
Pros:
1. It can solve a wide range of tricky problems:
"I use this 3rd party control, but when the text is too long it overlaps the title bar. How to trim it so it doesn't go beyond the top border?. Deadline is coming!"
2. Even if it doesn't solve the problem perfectly, the results are often acceptable
3. It takes minutes to try out unlike spending a day refreshing your math skills
Cons:
1. The biggest problem is that to keep it simple, you often lower the number of
variables by assuming some of them to be constant. In this post I've assumed that
the font family won't change for example, neither the font weight.
2. If any of the assumptions does not hold the final result could be even worse
This technique is fragile, but powerful. Use it as your last weapon and never leave magic expression like
fontSize = (int)(0.76 + 1.2 * aspectRation) without documenting how it came to be.
I'm trying to display some query results on a GridLayout but the results keep on shrinking once it is more than one. On codename one GUI Builder, I placed a container with GridLayout, 1 row and 4 columns within another container with BoxLayout Y. How can I overcome this please?
Please check the attached picture for more clarification.
Output Screenshot
Best Regards,
Yahya-Imam Munir Kolapo
You need to set the row count to match the number of actual rows you are adding which you can calculate based on the number of components / the number of rows.
You need to do this by code since the GUI builder can't know that at this stage.
I need a quick help my requirements are a bit complex. I need to show multiple timelines against months accordingly. Such that on the left side i have all the Products and in the chart i want to show Dates on a time line and bottom line represents months.
So i need to display multiple time lines against all those products according to months i am attaching an image of requirements.
I just need to know whether this kind of report is possible in QlikView.
We are already using QlikView for our project and have developed many reports but not kind of this report.
Please provide your input whether this kind of report is possible in QlikView and if you can provide an example and some explanation of controls that would be helpful.
Thanks
I found this helpful when i made a similar type of project chart.
Here is an example .qvw also
To be able to create this chart, you need some type of event in the data model, where each event has a start date (or time) and possibly also an end date. Further, an event should belong to some grouping, typically a project or a phase in time.
Given the above, we can now start making the graph:
Create a bar chart with the appropriate event grouping as dimension (e.g., project, phase, or other group of events)
Add the duration of the project as expression: Max(EndDate)-Min(StartDate). If you only have one date per event, you just replace both StartDate and EndDate with the date that you have. The duration will then be the time between the first event and the last.
Add the start of the project as an offset to the bars: Min(StartDate). [Chart Properties-Expressions-The plus sign to the left of the Expression-Bar Offset]
Set the graph orientation to horizontal bars. [Chart Properties-Style-Orientation]
Remove the “Force 0” option. This option will force the start of the time axis to be Dec 30th 1899. [ChartProperties-Axes-Expression Axes-Force 0]
Format the expression axis labels as dates or as months (e.g. M/D/YY or YYYY MMM). [Chart Properties-Number-Date]
Now you should have a Gantt chart. If you want to improve the way it looks, you may want to consider the following suggestions:
Add a grid. [Chart Properties-Axes-Expression Axes-Show grid]
If you want a label on each bar, add a second expression defining the text for the label and use this as “Value on Data Points.” [Chart Properties-Expressions-Display Options] Don’t forget to disable the “Bar” option for this expression. This is the first check box in the Display Options group.
If the chart shows a range which is too large, add static min and static max to define the display range of the expression, e.g. Min(StartDate)-5 and Max(EndDate)+40, respectively. The additional distance on the upper limit is to leave space for the text. The unit is number of days. [Chart Properties-Axes-Scale]
If you have a second dimension, you can add this too. But if you do, make sure you use the “Grouped” option and not “Stacked.” The latter does not work well with bar offsets. [Chart Properties-Style-Subtype]
You may want to use the same color within each value of the first dimension, e.g., one color per project. One good way to define the color (e.g. RGB values) is to do it already in the dimension table in the script and use this color in a color function in the bar background color, e.g. RGB (ProjR,ProjG,ProjB). [Chart Properties-Expressions-The plus sign to the left of the Expression-Background Color]
I need to provide space between cells in UITableview.And I am also posting an image which consists of here two cells.I have gone through previous posts,but I am unable to find a suitable answers.
Thanks coders
There are several ways to achieve this, and none as simple as you may expect, the two ways that come to my mind right know are:
Define your custom cell to add an space on bottom by playing with the foreground background. If you dont need the space (for instance at the last cell) resize the cell to hide it.
Use a grouped table with one section per cell so you can use that section as space
Being new to silverlight I'm struggling to 'get going' with the following.
Basically I wish to create some form of grid like control (custom or user?).
The idea is similar to that of a planner. Along the top are times (set intervals). Downwards are subjects. Then over the grid like background rectangles (or something) indicate when the subject is planned for.
The actual design of the above is not the issue. i.e. a grid with ractangles overlaid. But my issue is I wish this grid to be scrolled up and down (with bounds fixing the top and bottom when the subject lines start and end). And also the grid to be scrolled left and right (with bounds fixing how far left and right it can scroll, current time & 3 days into future).
Based on the above needs, I don't wish to create a control which is very large, and just dragged into view (unless this is the only way?) but instead show the grid at a current time and when dragged dynamically load the next few hours worth of content, possibly with a few hours buffer.
The appearance I am seeking is it looking like it is one massive control, but truely its not, its dynamic.
Does this make sense? Am I worrying about nothing? Should I create a massive grid well into the future and then just handle the load of data dynamically over the top? Its just my concern if I want a grid 3 month into the future this would be massive and a waste of memory.
I'm struggling to find examples on the net, but feel this maybe to do with me not knowing what to search for. This isn't about getting a detailed answer and someone doing it for me, but instead about guidance pointing me in the right direction.
Many thanks
About the up-down scroll: you can simply put a grid containing your data in a ScrollViewer control - this will handle all the scrolling for you. Another solution would be using a listbox control - this is better if you use MVVM. You can bind it to a data source and set as data template a custom control.
For the left-right scroll. I'm thinking you could use gestures for this. Like - catch left-to-right and right-to-left flicks and change the data in your grid / listbox according to the gesture's direction. You could also place two buttons at the top of the grid to handle scrolling from one day to the other (just like in the calendar controls: gestures + buttons).