在我的PowerBuilder应用程序中激活OLEControl时,工具栏项消失 [英] When activating OLEControl in my PowerBuilder application, toolbar items disappear

查看:483
本文介绍了在我的PowerBuilder应用程序中激活OLEControl时,工具栏项消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用C#创建了一个COM Interop控件,可以在我的PB应用程序中使用.如果我将ole控件添加到我的userobject并在painter中选择我的C#对象,则会创建一个 olecustomcontrol ,并且一切都会按预期进行.但是,为了在为64位平台构建项目时使用我的对象的64位版本(在PB Classic 12.6中),我添加了一个ole控件,但在要求选择对象时单击取消",因此 olecontrol 已创建,我可以在运行时使用InsertClass选择对象.这对我有用,但是我有一个问题:当用户单击我的控件并激活它时,我的MDI窗口上的工具栏图标消失了.根据我所做的研究,听起来PB可能希望ole对象提供菜单和工具栏,但是我的PB菜单项并不受影响,仅是工具栏.我的控件确实包含一个工具栏(该控件是我为解决内置控件的某些缺点而创建的富文本编辑器),但我也尝试过创建一个仅带有纯文本框的新Interop控件,并获得了相同的结果.实际上,我还尝试使用系统上安装的Microsoft控件之一(Microsoft InkEdit控件),并再次获得相同的结果.

I have created a COM Interop Control in C# to use in my PB application. If I add an ole control to my userobject and select my C# object in the painter, then an olecustomcontrol is created and everything works as expected. However, in order to use a 64-bit version of my object when building the project for a 64-bit platform (in PB Classic 12.6) I added an ole control but hit cancel when asked to select an object, so an olecontrol is created and I can use InsertClass to select my object at runtime. This is working for me but I have one issue: when the user clicks in my control, activating it, the toolbar icons on my MDI window disappear. From the research I have done, it sounds like PB may expect the ole object to provide the menus and toolbars, but my PB menu items are unaffected, it is just the toolbar. My control does contain a toolbar (the control is a rich text editor I created to workaround some shortcomings of the built in control) but I have also tried creating a new Interop Control with only a plain text box on it and got the same results. Actually I also tried using one of the Microsoft controls (Microsoft InkEdit Control) installed on my system, and again got the same results.

有人知道我该如何解决此工具栏问题? (我很茫然,但我想可能是我需要以某种方式告诉PB忽略OLE工具栏和/或告诉我的C#对象不要播发工具栏.)

Does anyone know how I can fix this toolbar problem? (I'm at a loss, but I'm guessing it may be that I need to somehow tell PB to ignore OLE toolbars and/or tell my C# object not to advertise a toolbar.)

推荐答案

这似乎是一个错误.我创建了一个非常简单的应用程序,该程序将数据检索到ole控件中,并且任何菜单项中都没有代码.一旦获取了数据并控制了焦点,主MDI工具栏便消失了.有人应该将该错误报告给SAP.

This seems a bug. I created a very simple application that retrieves data into ole control and there was no code in any menu items. As soon data is fetched and ole control gets focus the main MDI toolbar disappear. Somebody should report that bug to SAP.

https://answers .sap.com/questions/300798/toolbar-disappear-when-ole-control-get-focus.html

这篇关于在我的PowerBuilder应用程序中激活OLEControl时,工具栏项消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆