Querying component tray and attaching them to a property to select

dotnet framework

    Next

  • 1. Adding a blank row to top of ComboBox
    I'm binding an IList to a WinForm combox box DataSource (ComboxBox.DataSource = myList) and am unable to add a blank row to the top of the combox. I want users to have the option to not select a value. I've tried the following things: myBox.Items.Insert(0, null); ((IList)myBox.DataSource).Insert(0, null) Both of these attempts have been greeted by exceptions. Please let me know if you know of any way to solve my problem. Thanks, Jay
  • 2. DataGridView combobox column
    Hi, I know it is possible to have a combobox column bind to different datasource. For example in CellValidated events i set new datasource according to a previous column : CC = Nz(Dr.Cells("CodCamion").Value, "") DgC1 = DGW.Columns("CodCisterna") If CC <> "" Then DgC1.DataSource = GetDT(iE2kL.E2k.CNDB, "Select Descrizione, CodCisterna from TR_ZL_CamionCisterne Where CodCamion='" & CC & "' Order By Ordine") DgC1.DisplayMember = "Descrizione" DgC1.ValueMember = "CodCisterna" Else DgC1.DataSource = Nothing DgC1.DisplayMember = "" DgC1.ValueMember = "" End If The problem is when the datagrid is displayed i can't always see that column, due to this datasource setting "on the fly". Is there a way to avoid this ? thanks
  • 3. Handling Keyboard Shortcuts in a Windows MDI application
    In a standard Windows application, keyboard shortcuts such as Ctrl-X and Ctrl-V work in Windows forms controls but when the same control and form are placed as a child form within a Windows MDI application, these keyboard shortcuts no longer work as expected. Has anyone out there resolved this issue? Can someone point me in the right direction or offer code snippets? Thanks in advance. Regards, TC
  • 4. BindingNavigator - Adding Text
    Hello, I want to add text (basically, a label) to a BindingNavigator control, but I don't want it to have a rollover state like a button. An example of this is the BindingNavigator's position, where it reads "1 of 5", etc. When I use this code, it adds button-like text: myBindingNavigator.Items.Add("my Text"); Does anyone know how to make a ToolStripItem look like a label rather than a button? Thank you, Eric

Querying component tray and attaching them to a property to select

Postby KK » Wed, 01 Jun 2005 16:19:45 GMT

Hi

I want my custom textboxes to show all the available
error providers (if any have been added to the component tray)

So far,
1) I was able to query the component tray and identify
the error providers if there are any. By implementing
public override System.ComponentModel.ISite Site{}
in my textboxes

2) Implement a type converter that would list hard coded
string values in the property grid for text boxes.

What I don't know how todo is;

1) Query all available error providers (which I already have)
and pass them to the type converter.

2) Attach the TypeConverter to a property So that users will be
able to select one of the error providers from a list via
this property

3) Able to refresh if any change has happened,such as
new ErrorProvider added or removed etc...

4) Obtain a reference to the error provider object which
the user have selected.

Any help would be greatly appreciated

rgds
KK




Similar Threads:

1.Accessing controls that are attached to a tray control

I am new to Visual Basic .NET, so some of the terminology that I use here
may not be accurate, but I am confident that someone out there will be able
to fill in the gaps.

I am creating a non-visible/tray control that monitors other custom controls
for changes (among other things).  One of the monitored controls is a new
textbox that adds functionality to the standard textbox, and includes a
variable that points to the monitoring tray control... it works just like
the imagelist that is attached to any control that supports imagelists, such
as a treeview or listview.  Everything is working the way I would like at
this point -- Custom event handling, reading/writing properties, etc.

Now I would like to iterate through the list of controls attached to the
tray control.  Using the imagelist as an example, I want to loop through a
collection of all the controls that are attached to (are using) a certain
imagelist.

I haven't found a way to do this using the tray control object.  One thing
that I considered was iterating through the form's controls and checking for
the tray control property, but this seems like a slow and undesirable
solution.

Is there a better way to efficiently access the controls attached to a tray
control in the way that I am describing?

Thank you,
Robert




Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 21 guest