VS Desktop Express 2012 - Hide components at design time - visual-studio-2012

I have not been able to find a proper solution or answer for this.
I have lots of elements (buttons, labels, ...) that I need to add into a form; I am doing this at design time.
Can I hide certain of these elements at DESIGN time?
For example, I have a tableLayoutPanel with 12 rows. As I add and add elements into the rows, at some point the tableLayoutPanel extends the form and I have to resize again and again the form and the panel and so on as it grows.
Appreciate any answers,
best regards
Dennis

Related

View Column Headers Fixed Using XPages

I need one help related to view panel column headers. I am using view panel to pull the data from SQL using JDBC Connection manager and displaying in view panel control using Xpages. I am displaying 500 rows at a time and when users trying to scroll the data the column headers are going scrolling up. So, now I need to fix all view column header should be fixed when the rows are scrolling up/down. Can anybody help me regarding this?
You can add that capability to an existing viewPanel with the jQuery.Thead plugin. There are only 2 steps involved:
Download the library and add it to your XPage/ application.
Activate the plugin for your viewPanel (or repeat):
x$("#{id:viewPanel1}").floatThead({});
(the x$ function comes from the ExtLib Bootstrap theme)
I've put together a small demo here:
http://bootstrap4xpages.com/bs4xp/demos.nsf/fixedHeaders.xsp
May be have a look at DataTables, for details to implement this in XPages see the blogs ofOliver Busse, http://oliverbusse.notesx.net/hp.nsf/blogpost.xsp?documentId=D5E
The easiest way will be to add viewStyle to your viewPanel and set it to 100%.
I hope this helps!

xpages list of links to different views

There is a Custom Control called layout_main which contains 4 other custom controls, including a layout_left custom control.
The layout_left contains 4 links: All docs,By Number,By Name and By Code. The first link By Date contains a Simple Action Root: Open Page -> Name of page to open: viewAllDocuments, which is a Xpage element. viewAllDocuments contains the layout_main custom control and ccViewAllDocs in a facetContent. This custom control ( ccViewAllDocs ) contains, finally, the view which lists all the docs + some elementary buttons: New and so on.
My question ( my headache ) is: For the 3 others links should I create 3 others xpages like viewAllDocuments? And then modify its facetContent ? If my 'navigator' has 15 links, creating 15 xpages is quite monotonous.
I'm quite new in Xpages development, just being a Lotus Notes developer, and I hope your tips and help will be very helpful. These couple weeks for me since I start learning Xpages is quite an adventure for me: with ups and downs, with big headaches and some little moments of happiness.
I really appreciate your time. Thanks!
In the IBM tutorial is a XSLT style sheet to generate an XPage from a view. You could take that approach. You also could use the dynamic view control and compute the view name from an URL parameter, then you only need one page.
Many possibilities. Ask more!

Dynamically add / remove editable area to custom control embedded in XPage

Okay... this is a little difficult to explain but I will try my best.
In Custom Control while adding properties in Property Definition we can set "Allow multiple instances" which allows us to add multiple instances of that property when the control is embedded in XPage.
Similarly, I need to know whether it is possible to add (and remove) Editable Areas in a custom control when it is embedded in XPage? What I plan is that I would have a repeat control inside my custom control and I would be able to put the contents in each editable area in every loop of that repeat.
Is this the right way to go about or am I looking at this problem incorrectly? Any solution not involving editable areas is also welcome :)
Update 4 Apr 2013:
A use case context I am looking for is a simple carousel where contents of each screen in carousel can have different contents. These contents would be put into each (dynamically added) editable area. The contents can be very different from each other with one screen containing only text, other only image and another both image and text.
Look at the table walker example in the 26 original exercises. It does mostly what you are looking for (conceptually). You won't need multiple editable areas. Whatever is inside the repeat gets repeated.
What you want to do is to give the control a custom property "boolean editMode" so you can render that one line to be edited - if that's the UI pattern you want to follow.
You also could consider a dojo table with Ajax which allows for a familiar spreadsheet UI

drawing grids in a UITableViewCell using Monotouch

Hi I am just a week old with Monotouch, the task that I have in hand is to display a table on an ipad with multiple rows and multiple columns i.e. a grid like structure with many cells and each cell containing some data which can later be edited too.
My application should look somewhat like the figure below, except that it has to be working on an ipad.
The only useful link I've found is this, but this article discusses how to do so using Objective C(now since I am using Monotouch & c# so I am not comfortable with Objective C so I cannot understand this solution).
So my question how to achieve the same (i.e. a table with many columns and rows - a grid) using Monotouch.
Please help! Thanks in Advance.
Ajit,
If you want to use the UITableView'to render your data, you should effectively make it so that each "row" can render the columns in the way that you need.
What you need to do is to create a UIView subclass that can render the elements in your columns. There are various ways of doing that, you can:
Create your own UIView that implements a draw method and draws on demand.
Create a UIView that is a composite and merely has some children views
Once you have the view, you can add this to your UITableViewCell
You can follow some of my recommendations for creating those UITableViewCells here:
http://tirania.org/monomac/archive/2011/Jan-18.html
But 2-D browsing using a 1-D design is not optimal. Chances are that all that you want is to render your various items in a grid, so you might as well just use the UIScrollView directly and add all of your child UIViews there.
The only difference is that UITableView is designed to recycle/reuse some expensive objects (each row) while a basic design that stashes everything on the view will not have any of those benefits.
A more advanced option would be for you to create/destroys the views that are shown/hidden as the user scrolls.

Design-time support on composite control

I'm creating a specific DataGridView control that includes two scrollbars so that I can control their size and visibility. So, I have created a User control that contains the DataGridView and the two scrollbars inside a 2x2 TableLayoutPanel.
The issue I'm facing is that when I add my control to a Windows Form, I can't set my DataGridView's DataSource or define the column styles from the design view, because the link that I use for that when I use a common DataGridView (that little white arrow appearing on the top right side of the DataGridView) is not appearing.
While doing some testing, I saw that if I inherit my control from DataGridView, that link appears. But if I do that, I guess that I can only extend the functionality for the DataGridView, but I need my control to be a composite control.
So, that's my question: how can I get those design-time capabilities on my custom control? I am specially interested on the columns layout and the datasource.
Best regards.
If you are doing a usercontrol (a control that has an .ascx codebehind file) there seems to be no way to control this:
How to hide the inner controls of a UserControl in the Designer?
If you are doing a WebControl (a class that inehrits from WebControl with no .ascx file) you may create your own designer and maybe somehow output the designers of both conrols. Have a look at: http://msdn.microsoft.com/en-us/library/12yydcke.aspx it explains how to create a webcontrol and its desgner.
Some things with usercontrols/webcontrols seem to be easy but are hard to implement...
Hope this helps!

Resources