久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='z6ErO'></small><noframes id='z6ErO'>

  1. <legend id='z6ErO'><style id='z6ErO'><dir id='z6ErO'><q id='z6ErO'></q></dir></style></legend>
    <i id='z6ErO'><tr id='z6ErO'><dt id='z6ErO'><q id='z6ErO'><span id='z6ErO'><b id='z6ErO'><form id='z6ErO'><ins id='z6ErO'></ins><ul id='z6ErO'></ul><sub id='z6ErO'></sub></form><legend id='z6ErO'></legend><bdo id='z6ErO'><pre id='z6ErO'><center id='z6ErO'></center></pre></bdo></b><th id='z6ErO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='z6ErO'><tfoot id='z6ErO'></tfoot><dl id='z6ErO'><fieldset id='z6ErO'></fieldset></dl></div>
    <tfoot id='z6ErO'></tfoot>
      <bdo id='z6ErO'></bdo><ul id='z6ErO'></ul>
    1. C# .NET Compact Framework,自定義 UserControl,焦點問題

      C# .NET Compact Framework, custom UserControl, focus issue(C# .NET Compact Framework,自定義 UserControl,焦點問題)

        <small id='LCTik'></small><noframes id='LCTik'>

          <tbody id='LCTik'></tbody>
          <legend id='LCTik'><style id='LCTik'><dir id='LCTik'><q id='LCTik'></q></dir></style></legend>
          • <bdo id='LCTik'></bdo><ul id='LCTik'></ul>
            <i id='LCTik'><tr id='LCTik'><dt id='LCTik'><q id='LCTik'><span id='LCTik'><b id='LCTik'><form id='LCTik'><ins id='LCTik'></ins><ul id='LCTik'></ul><sub id='LCTik'></sub></form><legend id='LCTik'></legend><bdo id='LCTik'><pre id='LCTik'><center id='LCTik'></center></pre></bdo></b><th id='LCTik'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='LCTik'><tfoot id='LCTik'></tfoot><dl id='LCTik'><fieldset id='LCTik'></fieldset></dl></div>

          • <tfoot id='LCTik'></tfoot>

                本文介紹了C# .NET Compact Framework,自定義 UserControl,焦點問題的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我有一個自定義 UserControl(一個標簽和一個文本框).

                I have a custom UserControl (a label and a textbox).

                我的問題是我需要處理按鍵按下、按鍵向上事件以在表單中的控件之間導航 (.NET Compact Framework 文本框、組合框等).使用 .NET Compact Framework 框架提供的控件,它可以工作,但是當我到達我編寫的用戶控件時,該控件沒有獲得焦點(里面的文本框獲得焦點)所以從這個用戶控件我無法導航,因為在面板中我無法控制誰擁有焦點.

                My problem is I need to handle the key down, key up events to navigate between controls in the form (.NET Compact Framework textbox, combobox, etc). With the controls provided by the .NET Compact Framework framework it works, but when I reach a usercontrol written by me, that control don`t get focus (the textbox inside get the focus) so from this usercontrol I cannot navigate because in the panel I don't have any control of who have focus.

                一個小模型:Form->Panel->controls-> on keydown event (使用 KeyPreview) with a foreach 我檢查面板上有焦點的控件并使用 SelectNextControl 傳遞給下一個控件,但沒有人有焦點,因為 usercontrol 沒有獲得焦點...

                A little mock up : Form->Panel->controls -> on keydown event (using KeyPreview) with a foreach I check what control have focus on the panel and pass to the next control with SelectNextControl, but no one have focus because the usercontrol don`t got focus...

                我試圖處理文本框 gotFocus 事件并將焦點放在用戶控件上,但我得到了一個無限循環..

                I tried to handle the textbox gotFocus event and put focus to the user control, but I got an infinite loop..

                有人知道我能做什么嗎?

                Does somebody have any idea what can I do?

                推薦答案

                我們在 Compact Framework 上做了完全相同的事情,添加了一個全局焦點管理器,支持使用鍵盤輸入在控件之間導航.

                We've done the exact same thing on Compact Framework, adding a global focus manager that supports navigating between controls using keyboard input.

                基本上,您需要做的是向下遞歸控件樹,直到找到具有焦點的控件.它的效率不是很高,但只要每個關鍵事件只執行一次,這應該不是問題.

                Basically, what you need to do is to recurse down the tree of controls until you find a control that has focus. It's not terribly efficient, but as long as you only do it once per key event, it shouldn't be an issue.

                為我們的遞歸焦點查找函數添加了代碼:

                Added the code for our recursive focus finding function:

                public static Control FindFocusedControl(Control container)
                {
                    foreach (Control childControl in container.Controls) {
                        if (childControl.Focused) {
                            return childControl;
                        }
                    }
                
                    foreach (Control childControl in container.Controls) {
                        Control maybeFocusedControl = FindFocusedControl(childControl);
                        if (maybeFocusedControl != null) {
                            return maybeFocusedControl;
                        }
                    }
                
                    return null; // Couldn't find any, darn!
                }
                

                這篇關于C# .NET Compact Framework,自定義 UserControl,焦點問題的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)
                Adding OnClick event to ASP.NET control(將 OnClick 事件添加到 ASP.NET 控件)
                Multiple submit Button click problem?(多個提交按鈕點擊問題?)
                • <tfoot id='xlmug'></tfoot>

                      <tbody id='xlmug'></tbody>
                        <bdo id='xlmug'></bdo><ul id='xlmug'></ul>
                          <legend id='xlmug'><style id='xlmug'><dir id='xlmug'><q id='xlmug'></q></dir></style></legend>

                          <small id='xlmug'></small><noframes id='xlmug'>

                        1. <i id='xlmug'><tr id='xlmug'><dt id='xlmug'><q id='xlmug'><span id='xlmug'><b id='xlmug'><form id='xlmug'><ins id='xlmug'></ins><ul id='xlmug'></ul><sub id='xlmug'></sub></form><legend id='xlmug'></legend><bdo id='xlmug'><pre id='xlmug'><center id='xlmug'></center></pre></bdo></b><th id='xlmug'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xlmug'><tfoot id='xlmug'></tfoot><dl id='xlmug'><fieldset id='xlmug'></fieldset></dl></div>

                          主站蜘蛛池模板: 日韩精品在线视频 | 91一区二区三区 | 精品一区二区三区91 | 国产中文字幕在线观看 | 色婷婷亚洲一区二区三区 | 色噜噜色综合 | 欧美精品1区2区3区 精品国产欧美一区二区 | 欧美精品导航 | 99精品99| 成人免费一区二区三区视频网站 | 久久一区二区视频 | 日韩一区二区三区视频 | 久久精品青青大伊人av | 国产成人a亚洲精品 | 久久精品久久久久久 | 天天操网 | 美日韩免费视频 | 久久久美女 | 视频在线观看一区 | 亚洲综合无码一区二区 | 亚洲自拍一区在线观看 | 成人在线免费 | 亚洲精品丝袜日韩 | 九九九久久国产免费 | 天天色影视综合 | 日日做夜夜爽毛片麻豆 | 久久九九网站 | 久久精品男人的天堂 | 久久精品中文字幕 | 91精品麻豆日日躁夜夜躁 | 久久久av中文字幕 | 欧美日韩在线综合 | 久久久久久国产精品三区 | 欧美日韩国产一区 | 久久国产一区二区三区 | 久国久产久精永久网页 | 精品国产乱码久久久久久中文 | 成人午夜高清 | 欧美一区二区网站 | av在线免费观看网址 | 伊人久久在线 |