Is it possible to resize a DateTimePicker or MonthCalendar Control in VB.net - vb.net

Essentially I want to re-size my dateTimePicker control to fit its parent container. I have tried to do this both through the Control Editor and programmatically but I simply cannot get the drop down calendar to expand at all. So 2 part question:
a) Is this even possible to do?
b) Is there an easy-to-implement solution to having a good looking calendar that fits its parent field? (i.e. using a data grid or something similar)
Any help or knowledge is greatly appreciated!!!

The size of both objects is fixed and defined by the size of its font. Thus you might change its size by affecting the font size. This works fine with DateTimePicker but does not seem to work with MonthCalendar. After a quick research I have found a pretty curious recommendation on the MSDN forum: "you can consider third party MonthCalendar controls to meet your requirement temporarily".
There are quite a few third-party options (after a really quick search I found this) or you might even create one by your own. I personally haven't ever had any problem with the in-built controls but if the size is so important for you I guess that you would have to search/develop something by your own.
Further recommendation: rely on WPF which does contain a resizable control (DatePicker). I want to highlight here that I don't like WPF at all and that thus this recommendation is because I don't see any other option (inside .NET).

Related

How to add scrolling option on component parameter GUI?

I'm using Dymola but I expect OpenModelica might very well be the same (or at least similar).
For a given component model sometimes it makes more sense to have lots of parameters shown on one "tab" of the parameter GUI. This can lead to an excessively long GUI which, for many reasons including for psychological reasons in relation to how humans process information, is not a appropriate solution.
To solve this I would like to add a vertical scroll bar on the parameter GUI. I believe I saw it once though I cannot recall exactly where.
For illustrative purposes look to the right side of your web browser window. That gray bar that goes up and down is the scrollbar :). I know, obvious but you never know.
I assume I need to put some command in an annotation somewhere though where and what command I am not sure. For example, I found some reference to a verticalScrollBarPolicy but alas, I can not find any documentation on this.
Anyone know how to do this?
EDIT #1:
Dymola (and Adrian indicated OpenModelica as well) will automatically create the scroll bar when the GUI gets larger than the screen. Unfortunately (at least in Dymola) there is little margin so if you GUI is a fraction smaller than the window the "OK" button will be covered by the ribbon on the bottom of the screen and the GUI will be needed to made slightly larger to make the scroll bar appear automatically. This is a reason why a manual option for a scrollbar would come in handy.
I think additional "tabs" might help?
As far as I know in OpenModelica we have a scroll bar for that dialog windows if the window would expand out of the screen.
As of this posting my understanding based on feedback on this forum, my own experience, and from additional discussions with others there is no current manual control of the GUI (i.e., size, scrollbars, etc.).
Your best bet if you come across issues (e.g., you have a super small 2nd monitor) is to use lots of tabs and keep descriptions very short (which is probably appropriate for most applications anyways).
This is a Dymola and OpenModelica issue not a modelica issue as it is not contained in the modelica specification (as I understand it).
If this changes and I find out about it I'll remove or update this post.

How to change a ComboBox to display items in a Loader?

I would like to have a ComboBox that handles large amounts of content by loading them asynchronously inside a Loader, so I can display a little BusyIndicator over the drop-down.
Is it maybe possible to achieve this through a style? I want to avoid having to recreate a ComboBox from scratch.
No. It may be possible in the future, though:
This one is a bit tricky to get right, and is still work in progress. It is not difficult to style the popup background, the same way it's currently doable for MenuStyle. What remains, as you pointed out, is to make that API public.
What we can't promise, is to be able to style the popup window shape. If QtQuick was backing store based, then most platforms support shaping the window. But QtQuick is OpenGL based, and desktop platforms support this in different ways. On mobile and embedded platforms, we can't use a separate window, so we need to build an abstraction that would use Item-based popups.
I'd suggest voting for and watching QTBUG-39476 if you're interested in this feature and don't want to write your own ComboBox.

how to prevent dojo name text box remove/delete name onclick

I want prevent users from possibility to delete a name by accident from the list.. It should be possible to delete a name by clicking only on [x]...
Thanks
Reconsider the plan as Stephan says. My advice: you have used filter elements from OneUI framework. That's not a good choice in my opinion.
My suggestion is to use list element of OneUI instead, for example:
You might want to reconsider that plan :-) - the behavior of the dojo value picker in any other application is to make the full entry a click target - since you don't control other applications, you create an interaction inconsistency that will rather annoy users.
... But if you have to:
The Dojo UI interaction is deeply wired into that control and can't be changed easily. Your sensible option is to take the source of the control and create your own dojo/dijiit widget. Since dojo supports name spaces, that can coexist with the default control. Check the dojo documentation. It contains tutorials how to do that.
You might find there are better uses for your time.

Alternative Button controls for winform?

Where can I find alternative button controls for vb.net Winform?
Not sure what you mean since you can just choose the font so that it's any size you want and I've not seen anyone else mention this problem so I'm not sure if anyone will have written any specific controls for it. However, if you want to customize the look other options would be to override the OnPaint and draw it yourself or create an image that contains the text and show that image instead of the text.
Vendors that offer button controls with more options than standard WinForms:
infragistics.com
telerik.com
devexpress.com
I'd recommend downloading trial versions and see if you can make their controls do what you are failing to accomplish with the built in button control
Or, you could create an image that shows the text you want and attach it to the button instead of text. This is not as ideal as if you can find a small readable font though!
A little bit late but it could be useful for other:
http://namtuk.com/mycommandbutton_DOTNET.aspx
It supports a lot of button style like Office 2010, Windows 8 Metro, ...

Is there a way to 'lock' the last item in a ListView to always show?

I am listing folders and folder sizes in a ListView for a VB.NET WinForm program I'm writing. I would like to total the folder sizes in the last entry of the ListView and 'lock' it show it always shows (even if scrolling through the list.
Is there a way to do this? I'd really like to avoid adding another control on the Windows Form to display the total.
EDIT:
Space is somewhat of an issue as I'm trying to keep this window small enough to work in a min screen resolution of 800x600 (I know, waaaaay not the standard, but I want to make this available to even those in the elderly community with problematic eyesight.
Thanks!
-JFV
There appears to be ways to do this in Webforms and WPF, but not in Winforms. You should probably use a text box. Any attempt to hack in a fixed totals row would most certainly be far more effort than the benefit obtained. It is certainly beyond my capabilities. Even the custom control shops like Telerik don't seem to do this.
http://www.telerik.com/products/winforms/gridview.aspx
If you're concerned about space, make the gridview a little smaller to accomodate the text box.