Sha256: ce9e512d8192a0260d19903272335a6222cb80bb9e70b17d12b6b686da53380e

Contents?: true

Size: 1.18 KB

Versions: 20

Compression:

Stored size: 1.18 KB

Contents

---
:wxTextEntry.GetInsertionPoint:
  :detail:
    :pre:
      :programlisting:
        - :pattern: !ruby/regexp /.*/
          :replace: |
            
            ```ruby
              def get_current_char(txt_ctrl)
                 pos = txt_ctrl.get_insertion_point
                 return '' if pos == txt_ctrl.get_last_position
              
                 txt_ctrl.get_range(pos, pos + 1)
              end
            ```
:wxTextCompleterSimple:
  :detail:
    :pre:
      :programlisting:
        - :pattern: !ruby/regexp /.*/
          :replace: |
            
            ```ruby
              class MyTextCompleter < Wx::TextCompleterSimple
            
                def get_completions(prefix)
                  firstWord = prefix.split(' ').shift
                  if firstWord == 'white'
                    ['white pawn', 'white rook']
                  elsif firstWord == 'black'
                    ['black king', 'black queen']
                  else
                    ['white', 'black']
                  end
                end
            
              end
              ...
              text_ctrl = ...
              text_ctrl.auto_complete(MyTextCompleter.new)
            ```

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
wxruby3-1.4.2 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.4.1 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.4.0 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.3.1 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.3.0 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.2.1 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.2.0 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.1.2 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.1.1 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.1.0 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-1.0.1 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.8 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.7 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.5 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.4 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.3 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.2 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.1 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.0 rakelib/lib/generate/doc/text_entry.yaml
wxruby3-0.9.0.pre.rc.3 rakelib/lib/generate/doc/text_entry.yaml