Code Monkey home page Code Monkey logo

Comments (3)

jpobst avatar jpobst commented on May 13, 2024

Thanks for the fixes!

  1. I do not know how to test this. How do I type a "multi-chars" input?
  2. Committed your fix.
  3. The way control styles are currently set up is through the Style property. This can be done on the class level which will style all instances of that Control, or the instance level which will only style the individual control.

For example:

// Give all TextBoxes red text
TextBox.DefaultStyle.ForegroundColor = SKColors.Red;

// Create a TextBox with blue text
var tb = new TextBox ();
tb.Style.ForegroundColor = SKColors.Blue;

I still haven't decided if I like this pattern, but I do like that it gives you a way to change all instances, which is something you can't easily do in Winforms.

Having said that, the TextBox was not honoring the styles set here, so I fixed that. There are likely other Controls that do not correctly honor the styles that will need to be fixed.

from modern.forms.

jzlhll avatar jzlhll commented on May 13, 2024

Thanks for the fixes!

  1. I do not know how to test this. How do I type a "multi-chars" input?
  2. Committed your fix.
  3. The way control styles are currently set up is through the Style property. This can be done on the class level which will style all instances of that Control, or the instance level which will only style the individual control.

For example:

// Give all TextBoxes red text
TextBox.DefaultStyle.ForegroundColor = SKColors.Red;

// Create a TextBox with blue text
var tb = new TextBox ();
tb.Style.ForegroundColor = SKColors.Blue;

I still haven't decided if I like this pattern, but I do like that it gives you a way to change all instances, which is something you can't easily do in Winforms.

Having said that, the TextBox was not honoring the styles set here, so I fixed that. There are likely other Controls that do not correctly honor the styles that will need to be fixed.

OK.
3. I prefer change for your style. The all instances using a default style I think is a good idea. What I want is a way to custom the single instance control is well.

  1. mutil-chars :
    sometimes we input words into textbox, is input with a string, but not one char by one char.

屏幕快照 2020-04-28 下午12 01 35

So the "women" wan't be input together because new KeyPressEventArgs (te.Text[0]) limited. It will only input the 'w' char.

With this patch, the whole string can input together. How to test maybe you have to install a inputMethod, such as Chinese one
MAC:
https://pinyin.sogou.com/mac/
WINDOWS:
https://pinyin.sogou.com/?r=mac&t=pinyin

from modern.forms.

jpobst avatar jpobst commented on May 13, 2024

Thanks! I added the multi-char code. I didn't test it, so hopefully it works!

from modern.forms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.