|
Home > Archive > Microsoft Content Management Server > July 2004 > adding new button on the ActiveX menu
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
adding new button on the ActiveX menu
|
|
| Marisa 2004-06-26, 10:49 am |
| I have the code to add one button in a new Toolbar. I have reached that the button appears, but this button isn't activated. I have done the necessary changes in ActiveXEditing.vbs, but I get one vbs error: "Invalid Argument", calling the next function:
Sub UpdateButton( byval pActiveHtmlEditor, byval strItemName, byval strTrueValue )
if pActiveHtmlEditor.dom.queryCommandEnabled(strItemName) = true then
If StrComp(pActiveHtmlEditor.dom.queryCommandValue(strItemName), strTrueValue)=0 Then
pActiveHtmlEditor.ToolbarState.Item(strItemName).Checked = true
Else
pActiveHtmlEditor.ToolbarState.Item(strItemName).Checked = false
End If
pActiveHtmlEditor.ToolbarState.Item(strItemName).Enabled = true
else
pActiveHtmlEditor.ToolbarState.Item(strItemName).Enabled = false
end if
End Sub
with the next code:
UpdateButton pActiveHtmlEditor, "InsertBreak", "True"
I don't know what the problem is. Could you help me, please?
| |
| Stefan [MSFT] 2004-06-26, 10:49 am |
| Hi Marisa,
posting the same message 5 times will not give you more accurate answers.
Thanks,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------
"Marisa" <Marisa@discussions.microsoft.com> wrote in message
news:D3CAC8AA-EE0C-4541-B07B-473E64A213EC@microsoft.com...
> I have the code to add one button in a new Toolbar. I have reached that
the button appears, but this button isn't activated. I have done the
necessary changes in ActiveXEditing.vbs, but I get one vbs error: "Invalid
Argument", calling the next function:
>
>
> Sub UpdateButton( byval pActiveHtmlEditor, byval strItemName, byval
strTrueValue )
> if pActiveHtmlEditor.dom.queryCommandEnabled(strItemName) = true then
> If StrComp(pActiveHtmlEditor.dom.queryCommandValue(strItemName),
strTrueValue)=0 Then
> pActiveHtmlEditor.ToolbarState.Item(strItemName).Checked =
true
> Else
> pActiveHtmlEditor.ToolbarState.Item(strItemName).Checked =
false
> End If
> pActiveHtmlEditor.ToolbarState.Item(strItemName).Enabled = true
> else
> pActiveHtmlEditor.ToolbarState.Item(strItemName).Enabled = false
> end if
> End Sub
>
>
>
> with the next code:
>
> UpdateButton pActiveHtmlEditor, "InsertBreak", "True"
>
> I don't know what the problem is. Could you help me, please?
| |
| Marisa 2004-06-26, 10:49 am |
| I'm sorry, but when I posted the mesagge, one error message appeared , and I thougth (obviously) that the post hasn't been posted.
"Stefan [MSFT]" wrote:
> Hi Marisa,
>
> posting the same message 5 times will not give you more accurate answers.
>
> Thanks,
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> MCMS FAQ:
> http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
> MCMS Sample Code:
> http://www.gotdotnet.com/community/...t+S
erver
> MCMS Whitepapers and other docs:
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
> --------------------------------
>
>
> "Marisa" <Marisa@discussions.microsoft.com> wrote in message
> news:D3CAC8AA-EE0C-4541-B07B-473E64A213EC@microsoft.com...
> the button appears, but this button isn't activated. I have done the
> necessary changes in ActiveXEditing.vbs, but I get one vbs error: "Invalid
> Argument", calling the next function:
> strTrueValue )
> strTrueValue)=0 Then
> true
> false
>
>
>
| |
|
|
| Marisa 2004-06-26, 10:49 am |
| Hi again Stefan .
I know what is the line, but this doesn't give me the solution. The line is the next:
UpdateButton pActiveHtmlEditor, "InsertBreak", "True"
Thank you for your efforts, I will be with my investigations.
"Marisa" wrote:
[vbcol=seagreen]
> I'm sorry, but when I posted the mesagge, one error message appeared , and I thougth (obviously) that the post hasn't been posted.
>
> "Stefan [MSFT]" wrote:
>
| |
| Stefan [MSFT] 2004-06-26, 10:49 am |
| Hi Marisa,
this seems to be fine.
Sometimes the error messages point to a wrong line of code.
Did you comment out this line to see if the code then runs fine or if it
points to a different code line?
Cheers,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------
"Marisa" <Marisa@discussions.microsoft.com> wrote in message
news:32F8AD3E-3BC7-4489-87F7-D4AC0C377195@microsoft.com...
> Hi again Stefan .
> I know what is the line, but this doesn't give me the solution. The line
is the next:[vbcol=seagreen]
>
> UpdateButton pActiveHtmlEditor, "InsertBreak", "True"
>
> Thank you for your efforts, I will be with my investigations.
>
>
> "Marisa" wrote:
>
and I thougth (obviously) that the post hasn't been posted.[vbcol=seagreen]
answers.[vbcol=seagreen]
rights.[vbcol=seagreen]
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm[vbcol=seagreen]
http://www.gotdotnet.com/community/...t+S
erver[vbcol=seagreen]
that[vbcol=seagreen]
"Invalid[vbcol=seagreen]
then[vbcol=seagreen]
StrComp(pActiveHtmlEditor.dom. queryCommandValue(strItemName),[vbcol=se
agreen]
=[vbcol=seagreen]
=[vbcol=seagreen]
true[vbcol=seagreen]
false[vbcol=seagreen]
| |
|
|
| Stefan [MSFT] 2004-07-01, 7:48 am |
| Hi Marisa,
did you include the relevant event handler to activate the buttons?
E.g.
Sub OnToolbarStateInitialize( ByVal strPlaceholderName, ByVal pState )
pState.Item("IABOTTOM").Allowed = True
End Sub
Cheers,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------
"Marisa" <Marisa@discussions.microsoft.com> wrote in message
news:269CA5BD-DC3F-416C-B4B4-01BAFEB740A1@microsoft.com...[vbcol=seagreen]
> Hi Stefan,
>
> I did it, and the error is solved now, but the button isn't activated yet.
> I have added the necessary code (I think so) in ActiveXEditing.vbs file,
> there are any other file in which I need to change something else?
>
>
> Thanks a lot!!
>
>
> "Stefan [MSFT]" wrote:
>
rights.[vbcol=seagreen]
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm[vbcol=seagreen]
http://www.gotdotnet.com/community/...t+S
erver[vbcol=seagreen]
line[vbcol=seagreen]
,[vbcol=seagreen]
no[vbcol=seagreen]
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm[vbcol=seagreen]
http://www.gotdotnet.com/community/...t+S
erver[vbcol=seagreen]
reached[vbcol=seagreen]
the[vbcol=seagreen]
byval[vbcol=seagreen]
true[vbcol=seagreen]
pActiveHtmlEditor.ToolbarState.Item(strItemName).Checked[vbcol=seagreen]
pActiveHtmlEditor.ToolbarState.Item(strItemName).Checked[vbcol=seagreen]
=[vbcol=seagreen]
=[vbcol=seagreen]
|
|
|
|
|