Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - CommandbarEdit control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CommandbarEdit control

 Post Reply Post Reply
Author
Message
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Topic: CommandbarEdit control
    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.
                       

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 12:31am
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....
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 1:32pm
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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 3:46pm

Hi, 

Try this first and ask later
 
axCommandBars1(1).FindControl(object type,CodeJock.cCommandBarIDs.ID_CALLCONTROL_NUMBERDIAL).Text;
 
 
(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....
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 4:15pm
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.
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 4:17pm
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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 4:33pm
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....
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2008 at 6:15pm
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);





Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 1:47am
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....
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 9:36am
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.

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 9:59am
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....
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 10:23am
Can't compile. :(
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 10:50am
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....
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 10:52am
Btw thanks for trying to help with this. 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 11:51am
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;   
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2008 at 1:49pm
uugh, it was using the AS to cast it. Many many thanks as this resolved it.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.