when I developed apps in C#, in visual studio designer there are lines which help with positioning form elements, e.g. it helps me, when I want to place one button right under another, on same X pos, when they have same X or Y snapline appear. can I enable this or similar feature in QtCreator? It's hard to make nice gui without it.
here is picture of snaplines in visual studio C# designer:
To make nice GUI in Qt Creator you need to read about layouts:
http://doc.qt.io/qt-5/examples-layouts.html
There are examples of basic layouts in documentations:
http://doc.qt.io/qt-5/qtwidgets-layouts-basiclayouts-example.html
What you show on your image, it is called Vertical Layout. Layouts can be within each other and you can create very complex interface through them. It will be resized correctly together with window.
Related
My aim is to create an application whereby a user can drag a label from a tabbed container into some form of holding area - which had a ruler and a basic grid. I have consulted Google on the subject but the tutorials seem to involve dragging and dropping form components in design view.
The final aim is to then take my holding area and translate that into a .xml file - whereby each dropped element has an entry as follows:
[Dragged Component Name][X Co-ordinate][Y Co-Ordinate][Other Param's].
Any help with both aspects would be very much appreciated - this is just for a demonstration to a colleague.
I think you need something like this:
http://msdn.microsoft.com/en-us/magazine/cc163871.aspx
This link contains information on creating form designing forms looking exactly like Visual Studio Forms Designer. This way you may need to handle less situations than writing a forms designer with conventional methods.
I have two questions.
I am usinq Devexpress Winforms
What is the name of control of the
Visual studio toolbox.I wanna add a
control list like visual studi
toolbox.What is the name?
How can I add the flow chart to my
c# project?
For Dev Express, I would perhaps try something like the XtraNavBar:
Windows Side Bar Control
For a flow chart, I don't think Dev Express has a C# winforms flow chart right now.
See comments from Dev Express
#Deneme, The style of control that you see as the Visual Studio Toolbox is called 'an accordion control'. There is not one in the standard forms toolset, but it is not too difficult to build your own out of buttons & panels, and you can tailor it to your own needs and situation.
As for your second question about adding a flow chart, I am not aware of a single tool that you can drag and drop on to a form and set your users loose, but again, it should not be too difficult for you to create panels & buttons to create your own. Depending your needs you may be able to use some pieces of the Office Developers Toolkit to help you get there.
I would like to create a GUI where the main panel expands him self only to the space available, and then if some of the tools 1 or 2 are activated they appear at the top right side and if other tool is started it would automatically displays below ht visible ones or at top of none is displayed...
And if possible the append function.
I think its possible to do this with a bunch of if statements to re-size the panels everytime something would change the window content but there must be an easy way to do this.
Is something similar to the workflow of visual Studio...
Right now im using Windows Forms but i think its possible to switch to WPF
So what I'm looking for is for tutorials,sites,guides or simple a call to pay attention to some options inside the visual studio himself to help me create what I'm trying to achieve.
Here is a mock up to a better understanding
http://i.stack.imgur.com/0vupi.jpg
P.S the only thing I managed to do is hide and make visible the tool panels, but the space is always occupied in blank, and they appear no at top or bottom but the place where i drop them even if i dock them.
If you're open to third party controls, Telerik makes a fantastic dock control that does exactly what you're looking for.
Another option would be Digital Rune Docking or Windows, which is free for non-commercial use.
I'm trying to learn how to make databases, using C# as the "master language". I've installed Microsoft Visual C# 2010 Express, created an application, etc. There's a bit of a problem though. The form on the GUI developer doesn't look normal. Usually on these things you'll see dots evenly-spaced all across the form. Also when you drag, let's say, labels on to the thing, it's pretty easy to gather exactly how big they are in both dimensions in most other IDEs. Lastly between the dots and the ease of visibility - and control - of the sizing of labels, you can usally line labels, textboxes, and other stuff up pretty easily.
In this IDE that's not quite the case. They've taken away the "coordinate dots", they've made the positioning of everything much more precise, you can't clearly see how big a label is after you put it down, etc. My question is this: How, if possible, could I switch the thing to the more traditional style in those regards?
I know my wording on this may be hard to follow. I don't know the exact terminology of some of this stuff.
Thanks!
In Visual Studio 2010 Professional, you can switch to grid mode instead of lines mode from the Options dialog box, by selecting Windows Forms Designer then setting the LayoutMode option to SnapToGrid.
Can you try that in Express?
I think you are writing off the IDE far too quickly - all this functionality is available in pro but can't vouch for express; perhaps you should try adding a bunch of controls to a form and dragging them round holding keys like [ctrl] - you will probably find most of what you need is right under your fingertips it just different to other IDEs
Like Frederic suggests the options panel contains some settings for the designer. Also ShowGrid can help with visual cues.
However I recommend using a LayoutManager like the TableLayoutPanel or FlowLayoutPanel and using the docking/anchoring techniques which eliminate boring pixel perfection problems you'll get by doing the alignments yourself. I am of course assuming you're doing a "normal" winforms Form here...
Have a look at this MSDN article: http://msdn.microsoft.com/en-us/library/ms171689.aspx
I am trying to create a panel which will have a set of "buttons" on it.
These buttons should have the following behaviour:
Appear similar to a tag (with
rounded edges)
Contain a red
cross to remove the filter/tag from
the panel, similar to the way internet
explorer tabs have an embedded cross to close the individual tab.
allow the user to click
on the tag and respond like a normal
button (as long as the click is not
in the red cross)
Number 1 is no problem, this is just appearance, however, regarding numbers 2 and 3, I am not sure if there is already code out there do to something similar...and I dont really want to reinvent the wheel if I can avoid it!
My question is: Does anyone know if there is something out there in infragistics which will do this simply, or will I need to write this myself by subclassing winform buttons?
Thanks in advance!
Is this new development or maintenance of an existing project?
If it is maintenance, you have a somewhat tougher time ahead. You'll implement a UserControl, probably segmented into two buttons. Use docking to get the behavior as correct as possible. The far right button would contain your cross image; the left (which would need to auto-expand as you resize the control) would contain your primary button behavior. Play with the visual styles until you get them right (EG, removing borders, etc).
If this is new development, and you haven't gotten too far into it, you might consider using Windows Presentation Framework (WPF) instead of WinForms. It will be easier to build the control and get it to look exactly how you want it. WPF includes an extremely powerful control compositing system which allows you to layer multiple controls on top of each other and have them work exactly as you'd expect, and it carries the added advantage of allowing full visual control out-of-the-box.
Either way, this is more work than dropping in an external component ... I've used Infragistics for years, and I can't think of anything they have which is comparable. The closest, but only if you're building an MDI application and these controls are for window navigation, is the Tabbed MDI window management tools -- and there, only the tabs (which replace window title bars) have this behavior.
I don't think that infragistics can do something like this. The UltraButton control can't.
Implementing a own control wouldn't be that hard.
your probably going to have to make a costume control for this type of work.