Infragistics - ButtonStyle in ToolBars

P

Pedro

Hi all;

This isn't the proper newsgroup but let me ask you vb.net experts,
some questions about infragistics. I really need help on this:

Can someone tell me how to add a button to a toolbar with an arrow
that can expand more options? The button should act like a button and
if clicked on the arrow, should show menus and sub-menus if needed.
I've been searching in Infragistics.Win.UltraWinToolbars and besides
ButtonTool, PopupMenuTool and others i did not find any similar
component.

Does Infragistics.Win.UltraWinToolbars.ArrowUIElement has anything to
do with it?

I've tryed the following:

Dim lobuttonExp As New
Infragistics.Win.UltraWinToolbars.ButtonTool("botao")

.... (this code refers to settings and properties of button and also to
the proper code for adding it to ultratoolbarmanager)
....

lobuttonExp.UnderlyingTool.UIElement.ChildElements.AddRange(New
String() _ {"one", "two", "three"})

but the error 'Object reference not set to an instance of an object'
occurs.

I've tryed to instance the object, making:


Dim loArrowUIElement As New
Infragistics.Win.UltraWinToolbars.ArrowUIElement([ParentElement],
UltraToolbarsManager1,
Infragistics.Win.UltraWinToolbars.ArrowUIElement.ArrowOrientation.Down,
Infragistics.Win.UltraWinToolbars.ArrowUIElement.ArrowSize.Medium)

but i don't know what should i put in [ParentElement].

Can someone help, pointing me to some kind of a sample?

Urgent!

Thanks in advance!!!
 
P

Pedro

Hi all;

This isn't the proper newsgroup but let me ask you vb.net experts,
some questions about infragistics. I really need help on this:

Can someone tell me how to add a button to a toolbar with an arrow
that can expand more options? The button should act like a button and
if clicked on the arrow, should show menus and sub-menus if needed.
I've been searching in Infragistics.Win.UltraWinToolbars and besides
ButtonTool, PopupMenuTool and others i did not find any similar
component.

Does Infragistics.Win.UltraWinToolbars.ArrowUIElement has anything to
do with it?

I've tryed the following:

Dim lobuttonExp As New
Infragistics.Win.UltraWinToolbars.ButtonTool("botao")

... (this code refers to settings and properties of button and also to
the proper code for adding it to ultratoolbarmanager)
...

lobuttonExp.UnderlyingTool.UIElement.ChildElements.AddRange(New
String() _ {"one", "two", "three"})

but the error 'Object reference not set to an instance of an object'
occurs.

I've tryed to instance the object, making:


Dim loArrowUIElement As New
Infragistics.Win.UltraWinToolbars.ArrowUIElement([ParentElement],
UltraToolbarsManager1,
Infragistics.Win.UltraWinToolbars.ArrowUIElement.ArrowOrientation.Down,
Infragistics.Win.UltraWinToolbars.ArrowUIElement.ArrowSize.Medium)

but i don't know what should i put in [ParentElement].

Can someone help, pointing me to some kind of a sample?

Urgent!

Thanks in advance!!!

I managed to resolve a part of the problem.

I found that exists 'PopupControlContainer' component which implements
the functionality that i've posted earlier.

My problem now is how to make my control added to
'PopupControlContainer' to be shown!!! I tryed the method showpopup, i
tryed to catch the event when i click over 'PopupControlContainer' and
force it to show, and nothing.

My code is implemented as follow:

Dim loPopupControlContainer As New
Infragistics.Win.UltraWinToolbars.PopupControlContainerTool("container")

loPopupControlContainer.SharedProps.Caption = "Container"
loPopupControlContainer.SharedProps.AppearancesSmall.Appearance.Image
= Image.FromFile("C:\Image.bmp")
loPopupControlContainer.Control = New Control

....

(This part of the code refers to properties and ultratoolbarsmanager)

....

and finally

loPopupControlContainer.Control.Controls.Add(loPopupMenu1.Control)

(loPopupMenu1 it's a popupmenu which is already defined and added to
ultratoolbarsmanager)


I'm sure i'm missing something! What?

Help is appreciated!!!

Thanks in advance!
 
C

craig

You should post this in the infragistics newsgroups. I have always gotten
good support in there.

Pedro said:
(e-mail address removed) (Pedro) wrote in message
Hi all;

This isn't the proper newsgroup but let me ask you vb.net experts,
some questions about infragistics. I really need help on this:

Can someone tell me how to add a button to a toolbar with an arrow
that can expand more options? The button should act like a button and
if clicked on the arrow, should show menus and sub-menus if needed.
I've been searching in Infragistics.Win.UltraWinToolbars and besides
ButtonTool, PopupMenuTool and others i did not find any similar
component.

Does Infragistics.Win.UltraWinToolbars.ArrowUIElement has anything to
do with it?

I've tryed the following:

Dim lobuttonExp As New
Infragistics.Win.UltraWinToolbars.ButtonTool("botao")

... (this code refers to settings and properties of button and also to
the proper code for adding it to ultratoolbarmanager)
...

lobuttonExp.UnderlyingTool.UIElement.ChildElements.AddRange(New
String() _ {"one", "two", "three"})

but the error 'Object reference not set to an instance of an object'
occurs.

I've tryed to instance the object, making:


Dim loArrowUIElement As New
Infragistics.Win.UltraWinToolbars.ArrowUIElement([ParentElement],
UltraToolbarsManager1,
Infragistics.Win.UltraWinToolbars.ArrowUIElement.ArrowOrientation.Down,
Infragistics.Win.UltraWinToolbars.ArrowUIElement.ArrowSize.Medium)

but i don't know what should i put in [ParentElement].

Can someone help, pointing me to some kind of a sample?

Urgent!

Thanks in advance!!!

I managed to resolve a part of the problem.

I found that exists 'PopupControlContainer' component which implements
the functionality that i've posted earlier.

My problem now is how to make my control added to
'PopupControlContainer' to be shown!!! I tryed the method showpopup, i
tryed to catch the event when i click over 'PopupControlContainer' and
force it to show, and nothing.

My code is implemented as follow:

Dim loPopupControlContainer As New
Infragistics.Win.UltraWinToolbars.PopupControlContainerTool("container")

loPopupControlContainer.SharedProps.Caption = "Container"
loPopupControlContainer.SharedProps.AppearancesSmall.Appearance.Image
= Image.FromFile("C:\Image.bmp")
loPopupControlContainer.Control = New Control

...

(This part of the code refers to properties and ultratoolbarsmanager)

...

and finally

loPopupControlContainer.Control.Controls.Add(loPopupMenu1.Control)

(loPopupMenu1 it's a popupmenu which is already defined and added to
ultratoolbarsmanager)


I'm sure i'm missing something! What?

Help is appreciated!!!

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top