![]() |
CommandbarEdit control |
Post Reply ![]() |
Author | |
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() Posted: 25 June 2008 at 3:49pm |
What is the correct method to obtaining the text in the box from the xtpControlEdit object? I have tried casting it to every possible thing out side the ControlEditClass (That has the .text item). Nothing else does.
CommandBarControl oItem = ax_CmdBarMDI.FindControl(CodeJock.cCommandBarIDs.ID_CALLCONTROL_NUMBERDIAL); I have tried CommandBarControl oItem = axCommandBars1.FindControl(CodeJock.cCommandBarIDs.ID_CALLCONTROL_NUMBERDIAL); CommandBarEdit Oitm1 = (CommandBarEdit)axCommandBars1.FindControl(CodeJock.cCommandBarIDs.ID_CALLCONTROL_NUMBERDIAL); CommandBarEditClass Oitm2 = (CommandBarEditClass)axCommandBars1.FindControl(CodeJock.cCommandBarIDs.ID_CALLCONTROL_NUMBERDIAL); Can't cast to the class but hey at least i tried. laugh. |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You want only the text entered in edit part?
This is a sample in VB, maybe it will help you:
txtText = CommandBars(1).FindControl( , ID_TOOLBAR_FILTERTEXT).Text
I believe the method would be the same but I don't see a comma in your line, is this correct?
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
In c# i don't have the option of only two.
public virtual CommandBarControl FindControl(int id); public virtual CommandBarControl FindControl(object type, int id, object visible, object recursive); are the only options. I can find the control, but .text is never part of the class. I see it in the CommandBarEditClass but not the CommandBarEdit. I am going to assume that i am missing something simple. |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi, Try this first and ask later
![]() axCommandBars1(1).FindControl(
(1) = index of added commandbar to CommandBars
ID_CALLCONTROL_NUMBERDIAL = ID of Control added to the commandbar(1)
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Think the vb ax wrapper has something i don't. Cant do two arguments and no array of commandbar controls to access. Since i only have a single instance. I can get the control and cast it to the edit control and what not, just no ability to access the .text property.
|
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
According to the documents the CommandBarEdit object should have a .text. However the demo does not. Maybe a limitation who knows. Only have till July 11th for the trial and need to see if this thing will really do what is needed.
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Do you add commandbar to commandbars or activemenubar. How do add the editcontrol. Can you give me a sample how you do this?
I can't stand if I'm not able to help you, even when you have a different language
![]() |
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
I used the designer to create everything. Im lazy and in a hurry. Tried
the activex a long time ago but they decided not to continue until we
replaced the phone system. So now we have a new system and i have to
have a working model to demo soon for a new client. Have two gui
components i am testing with. I just like the codejock suite better.
The commandbars are on a MDI form: internal AxXtremeCommandBars.AxCommandBars axCommandBars1; this.axCommandBars1 = new AxXtremeCommandBars.AxCommandBars(); this.axCommandBars1.Enabled = true; this.axCommandBars1.Location = new System.Drawing.Point(26, 22); this.axCommandBars1.Name = "axCommandBars1"; this.axCommandBars1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axCommandBars1.OcxState"))); this.axCommandBars1.Size = new System.Drawing.Size(24, 24); this.axCommandBars1.TabIndex = 1; this.axCommandBars1.Execute += new AxXtremeCommandBars._DCommandBarsEvents_ExecuteEventHandler(this.axCommandBars1_Execute); |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I ment how you add the editControl to commandbar. But I see you have an execute event handler
Try this:
private void CommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case ID.YOUR EDIT ID: MessageBox.Show(eventArgs.control.Text + " clicked", "Edit text"); break; } }
If you added the control correctly, you see the text you entered. |
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Dunno. It's just not there. Gotta be something with the demo control then or I am just loosing it. Here is the version screen and a shot of the class from vs2008.
![]() ![]() |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
With VB it doesn't show neither just try it anyway.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Can't compile. :(
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Strange ???? With VB it doesn't show but it works. Same as with a commandbar combobox (listindex) doesn't show but it works. Think you have to shout for someone who is really into C#
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Btw thanks for trying to help with this.
![]() |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Add this to C# Ribbon Execute Event and select different fonts in the Home tab:
case ID.ID_FONT_FACE: XtremeCommandBars.CommandBarComboBox myCombo = eventArgs.control as XtremeCommandBars.CommandBarComboBox; MessageBox.Show(myCombo.Text + " clicked", "Button Clicked"); break; |
|
![]() |
|
Nutty101 ![]() Groupie ![]() Joined: 31 August 2007 Location: United States Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
uugh, it was using the AS to cast it. Many many thanks as this resolved it.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |