久久久久久久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>

                          主站蜘蛛池模板: 国产三级精品三级在线观看四季网 | 国产黄色电影 | 日本黄色免费片 | 黄色片亚洲 | 久久这里有精品 | 免费在线观看一区二区三区 | 欧美久久一级 | 欧美女优在线观看 | 美女露尿口视频 | 国产成人99 | 欧美激情亚洲激情 | 国产美女黄色片 | 人人人人干 | 北条麻妃av一区二区三区 | 国产一级视屏 | 91精品国产综合久久久久久 | 日韩欧美视频在线 | 久久99蜜桃综合影院免费观看 | 国产精品久久九九 | 国产一级视频免费播放 | 九一视频在线观看 | 成人在线观看中文字幕 | 欧美精品久久久久久久久老牛影院 | 欧美国产激情二区三区 | 99热热| av一区二区三区在线观看 | 久久国产精品久久国产精品 | 69精品久久久久久 | 卡通动漫第一页 | 另类专区成人 | 成人天堂噜噜噜 | 日韩精品免费在线观看 | 欧美日韩视频在线 | 男女羞羞在线观看 | 91精品国产综合久久精品 | www.99热这里只有精品 | 国产视频一区二区 | 日本黄色短片 | 亚洲欧美国产毛片在线 | 久久久久国产一区二区三区 | 毛片免费看|