完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个程序的一部分,允许用户将某些值设置到注册表。
我在这个面板上有两个按钮,一个是“Save& Exit”,另一个是“Exit”。 因为它需要大约4-5秒才能将它全部写入注册表,一个不耐烦的用户可以在按下“保存并退出”按钮后按“退出”按钮,然后程序将停止将所需值写入到 注册表并退出该程序的这一部分。 按“保存并退出”时,该按钮变灰(因此您无法再次单击它)。 按“保存并退出”时,是否可以使“退出”按钮变灰? 程序的另一部分有另一个面板,其中包含一些用户对象,用户对象有自己的面板。 是否可以将userobject的面板与其作为用户对象的面板合并? 或者有没有办法让一个小组“在顶部”,所以它不能在另一个小组后面消失..问候,托比亚斯 以上来自于谷歌翻译 以下为原文 Hi I've got a part of a program which allows the user to set certain values to the registry. I got two buttons in this panel, one which is "Save & Exit" and one just "Exit". As it takes about 4-5 seconds for it to write it all to the registry an impatient user could after pressing the "Save & Exit" button press the "Exit" button, and the program will then stop writing the wanted values to the registry and exit this part of the program. When pressing "Save & Exit" the button gets grayed out (so you can't click on it again). Is it possible to make the "Exit" button grayed out too when pressing "Save & Exit"? Another part of the program has another panel with some user objects and the user objects have their own panel. Is it possible to merge to panel of a userobject with the panel of where it is a user object? Or is there a way to have a panel be "on top" so it cant dissapear behind another panel.. Regards, Tobias |
|
相关推荐
4个回答
|
|
托比亚斯,我有点惊讶你的注册表写作花了这么长时间 - 可能值得研究一下,因为那里可能有些不妥。但在回答你的问题时,答案是'不',据我所知:
您可以设置一个标志(如果先按下另一个按钮,则忽略'exit'命令),隐藏面板(请参阅第二个问题)或者您可以用其他东西覆盖按钮(例如灰色的虚拟按钮) out!)。至于'合并'面板,答案是'是'。 简而言之,为UserObject创建一个面板; 右键单击其图标并选择“恢复”,然后将子面板添加到主面板。 完成后,可以将UserObject面板视图更改回详细视图中的图标。 如果你想看看关于这方面的主题的迷你教程,请访问http://www.preciselyso.co.uk - > VEE资源中心选项卡 - >选择右侧的工具和提示 - >寻找“ 教程:静态,弹出窗口和状态面板“ 以上来自于谷歌翻译 以下为原文 Tobias, I'm slightly amazed that your registry writing takes so long - it may be worth examining that as there is probably something amiss there. In answer to your question though, the answer is 'no' as far as I'm aware: you can set a flag ( so that the 'exit' command is ignored if the other button was pressed first ), hide the panel ( see your second question ) or you can cover the button with something else ( e.g. a dummy button which is greyed out! ). As to 'merging' panels the answer is 'yes'. Briefly, create a panel for the UserObject; right-click on its icon and select 'restore' then add the sub-panel to the main panel. You can change the UserObject panel view back to an icon in the detail view once you have done that. If you want to look at my mini-tutorial on the subject which covers this aspect go to http://www.preciselyso.co.uk -> VEE Resource Centre tab -> choose Tools and Tips on the right -> look for "Tutorial: Static, Pop-up and Status Panels" |
|
|
|
假设您有VEE 8.0或更高版本,当单击“保存并退出”时,您很容易使“退出”OK按钮变灰(并在以后再次重新启用它)。请为“退出”声明一个名称(如ExitButton)
属性中的“确定”按钮。 然后在单击“Save& Exit”时使用公式:ExitButton.EnableOnPing = FALSE.8.0中引入的可编程属性确实有助于创建良好的GUI。 以上来自于谷歌翻译 以下为原文 Assuming you have VEE 8.0 or later you easily gray-out the "Exit" OK-button when "Save&Exit" is clicked (and re-enable it again later). Just declare a name (like ExitButton) for the "Exit" OK-button in Properties. Then use a Formula with: ExitButton.EnableOnPing=FALSE when "Save&Exit" is clicked. The programmable properties introduced in 8.0 really helps creating good GUIs. |
|
|
|
“托比亚斯,我有点惊讶你的注册表写作花了这么长时间 - 可能值得研究一下,因为那里可能有些不妥。但在回答你的问题时,答案是'不',据我所知
:你可以设置一个标志(如果先按下另一个按钮,则忽略'exit'命令),隐藏面板(见第二个问题),或者你可以用其他东西覆盖按钮(例如一个虚拟按钮, 灰色!)。至于“合并”面板,答案是“是”。简而言之,为UserObject创建一个面板;右键单击其图标并选择“恢复”,然后将子面板添加到主面板。 完成后,可以将UserObject面板视图更改回详细视图中的图标。如果您想查看有关此方面主题的迷你教程,请访问http://www.preciselyso.co.uk - > VEE资源中心选项卡 - >选择右侧的工具和提示 - >查找“教程:静态,弹出和状态面板”“我找到了reg的原因 istry写作花了这么长时间(可能值得补充一点,我从一开始就没有编写这段代码),这部分的作者由于未知的原因在写作中增加了延迟。 感谢您的帮助和帮助 教程链接,我会稍微阅读一下。 “假设您有VEE 8.0或更高版本,当单击”保存并退出“时,您很容易将”退出“OK按钮变灰(并在以后再次重新启用它)。为”退出“声明一个名称(如ExitButton) “属性中的OK按钮。然后在单击”保存并退出“时使用公式:ExitButton.EnableOnPing = FALSE。8.0中引入的可编程属性确实有助于创建良好的GUI。”谢谢,这就是诀窍。 我对这些可编程属性没有任何了解,有时间阅读它们,因为它们看起来非常方便。 以上来自于谷歌翻译 以下为原文 " I found the reason why the registry writing takes so long (might be worth adding I've not written this code from the start) and the author of this part has for unknown reason added a delay in the writing. Thanks for the help & tutorial link, I'll read through it in a bit. " Thanks, that did the trick. I had no knownledge about these programmable properties, time to read up on them as they seem pretty handy. |
|
|
|
那我也学到了一些东西。
我曾经看过那个房产,但我猜到它做了什么,猜错了! 这意味着你可以启用/禁用按钮但它必须在它运行之前被ping(正常的VEE规则)。我提供附加的示例程序:如果你让它运行,那么OK按钮'闪烁'几个 在启用和禁用状态下显示它的次数。 如果按结束处的“确定”按钮,则无法通过将EnableOnPing属性设置为true来重新启用它。为清楚起见,可以通过单击“确定”按钮找到对象名称“按钮”,打开属性并查找 对于“声明的名称”字段。 另请注意,与其他变量一样,您可以根据需要访问它的位置更改该名称的范围。 以上来自于谷歌翻译 以下为原文 Well I learned something there too. I had seen that property but I guessed what it did and guessed wrongly! What it means is that you can enable/disable the button but it must be pinged ( as normal VEE rules ) before it will operate. I offer the attached example program: if you let it run then the OK button 'flashes' a couple of times showing it in both enabled and disabled states. If you press the OK button at the end then you cannot re-enable it with by setting the EnableOnPing property to true. Just for clarity, the object name 'button' can be found by clicking on the OK button, opening the properties and looking for the Declared Name field. Note also that like other variables you can change the scope of that name depending on where you need to access it. 附件
|
|
|
|
只有小组成员才能发言,加入小组>>
1223 浏览 0 评论
2347 浏览 1 评论
2157 浏览 1 评论
2022 浏览 5 评论
2902 浏览 3 评论
964浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
700浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
801浏览 0评论
1223浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 00:04 , Processed in 1.630079 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号