Конференция "KOL" » tabstop bug in kol 3.05
 
  • f417support © (22.01.11 04:10) [0]
    if i set editbox property  tabstop = false ,  editbox will be disabled.
    to skip this , must USE_FLAGS
  • Vladimir Kladov © (22.01.11 11:37) [1]
    No it is not disabled: I can type characters in it. But the system does not show caret. This seems very annoying though. I'll see more later. With USE_OLD_FLAGS it seems looking more correct.
  • Vladimir Kladov © (22.01.11 11:55) [2]
    I uploaded KOL.zip with KOL.pas. KOL_asm.inc 3.06+. It seems fixes TabStop with less code then before. Please test it.
  • f417support © (23.01.11 10:50) [3]
    problem is solved, things work fine! thank you, thank for your great job!
  • f417support © (24.01.11 03:46) [4]
    sorry for this same problem.  when editbox tabstop = false, if i use code

     EditBox1.Focused := True;
     EditBox1.SelectAll;

    code will not work! even with USE_OLD_FLAGS
  • Vladimir Kladov © (24.01.11 15:34) [5]
    Use Windows.SetFocus( EditBox1.Handle );
    Changing code of TControl.SetFocus seems can cause other problems.
  • f417support © (25.01.11 04:05) [6]
    I have to Use USE_OLD_FLAGS to skip it, becase a lot of code must be changed, i think it must be a bug of new USE_FLAGS( compress boolean flags).
  • f417support © (25.01.11 05:10) [7]
    procedure TControl.SetFocused(const Value: Boolean);
    var PF: PControl;
    begin
     if  not Value or
         {$IFDEF USE_FLAGS} not( F2_Tabstop in fStyle.f2_Style )
         {$ELSE}            not fTabStop {$ENDIF} then Exit;
    end;

    if TabStop = False, Control Can't Get foccused? i think maybe comment check TabStop Property
  • Vladimir Kladov © (27.01.11 16:42) [8]
    No, use Windows.SetFocus, as I write above. Changing TControl.SetFocused is not desirable. May be even not dangerous but too many checks should be done to ensure that all is OK.

    Renaming of IndexOfName is a good idea, I'll do so in the next update.
  • f417support © (28.01.11 04:08) [9]
    in mck  2.94, define textbox's TabStop Property to False,  only define textbox style not WS_TABSTOP, no code textbox.TabStop:= fase is auot maked, so textbox's TabStop Property is still false in runtime.
    actually, fTabStop is always True if you use mck's auto code, so code is like skip check tabstop property if USE_OLD_FLAGS.
  • Jon © (30.01.11 03:25) [10]
    Vladimir's suggestion works perfectly:


    program Test;

    uses Windows, KOL;

    var Button, Editbox: PControl;

    procedure ButtonClick(Dummy: Pointer; Sender: PObj);
    begin
     Windows.SetFocus(Editbox.Handle);
    end;

    begin
     Applet := NewForm(nil, 'Test');
     Applet.Tabulate;
     Button := NewButton(Applet, 'Button');
     Button.OnClick := TonEvent(MakeMethod(nil, @ButtonClick));
     Editbox := NewEditbox(Applet, []).PlaceDown;
     Editbox.Color := clWindow;
     Editbox.Tabstop := False;
     Run(Applet);
    end.

  • f417support © (30.01.11 03:37) [11]
    i known Vladimir's suggestion works perfectly.but i am a old kol&mck 2.94 user, i must convert my old kol&mcj project to new kol&mck3.06, my probem is compatible, i try to find a way to resovle this problem by not change any code. because my project is large, too much code must be changed!
  • Jon © (30.01.11 03:43) [12]
    Ah, I see. But sometimes changes are necessary - especially for the newer benefits.

    I am curious - what is your project? I don't know many big users of KOL. Do you have a link?
 
Конференция "KOL" » tabstop bug in kol 3.05
Есть новые Нет новых   [120350   +20][b:0][p:0.001]