Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrating jquery/javacript type UI's into dialog's
#3
Hi Gintaras,
I am returning to this topic after a while with some progress but a a few additional questions.
I am able to add a toolbar easily to a dialog using a js menu generated in Likno AllWebMenus Pro. I add the following html code generated by the Likno software:

Code:
Copy      Help
<body>
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="menu",awmBN="910";</script><script charset="UTF-8" src="menu.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
</body>

to an empty html file "Menu.html" referencing a file menu.js generated by the software at the same file directory level.
I then just reference the html in your ActiveX window like below:

Function DialogWithJsMenu
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages


;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 435 175 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;4 Edit 0x54030080 0x200 96 42 96 14 ""
;5 Static 0x54000000 0x0 0 44 92 13 "Text"
;3 ActiveX 0x54030000 0x0 0 0 434 38 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030502 "" "" "" ""

str controls = "3"
str ax3SHD
if(!ShowDialog("DialogWithJsMenu" &DialogWithJsMenu &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,,SHDocVw.WebBrowser we0._getcontrol(id(3 hDlg));;reshub
,,we0.Silent=TRUE ;;prevent script error messages
,,we0.Navigate("C:\Menu.html")
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Couple questions from here though:

First, even though I size the browser window just right, I don't want the vertical slider bar element to be present. I can't figure out the right combination of style flags to get rid of it. Is it possible for a web browser Active X element.
Second (and maybe harder): This type of web menu is fine if there are no dropdowns but if there are, then the ActiveX element object in the dialog has to be size tall enough to handle it.So here is my idea, is it possible in a dialog, to have the element be transparent for the background (i.e. the empty portion of the html page), but the js menu be visible. Then other items in the dialog could be just underneath the menu portion of the ActiveX browser window but when the menu dropdowns are triggered they will superimpose on other dialog elements just like regular QM/windows menu. I have used this transparency with dialogs where some elements expand larger than the visible elements of the parent dialog. I am not sure whether this is possible within a dialog however.

(I know this may be crazy idea or too hard programatically but it would be so cool to open up the dialog making ability of QM with js themes and templates)

Thanks for your consideration, S


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)