sRadiobutton and scheckbox not dimmed text when disabled

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #33008
    shadow_tj
    Participant

    when you have a sradiobutton, place it on a something white and i can disable the sradiobutton.

    the button selection is now colred grey, but the text is still black.
    same happens with sCheckbox. the checkbox has gray collered skin… text is still black.

    found out that

    sRadiobutton DrawCheckText … line 291 has the following line of code.
    acWriteTextEx(FCommonData.FCacheBmp.Canvas, PacChar(Caption), true, rText, Fmt, FCommonData, ControlIsActive(FCommonData) and not ReadOnly);

    why is the acwritetextex not using enabled there ?? like this
    acWriteTextEx(FCommonData.FCacheBmp.Canvas, PacChar(Caption), enabled, rText, Fmt, FCommonData, ControlIsActive(FCommonData) and not ReadOnly);

    then the caption of the label behind the box is also grey when disabled.

    TsCheckBox.DrawCheckText; there its line 377.

    greetings,

    shadow_tj

    #39464
    Support
    Keymaster

    sRadioButton and sCheckBox are fully blended when disabled in other place (line №459 in sRadioButton.pas beta)
    So, is no need to draw a grayed text, text will be alphablended. I have tested it and haven't a black text when disabled. Could you show a screenshot?

    #39472
    shadow_tj
    Participant

    here is a sample made with my adjusted alphaskin source.

    when compile it with original v6.31 then both text labels are black instead of dimmed and black color.
    prehaps its something that happens when you insert them on a lmd panel..

    because when a both are placed directly on a form its indeed blended. but on the lmdpanel its both black. and not one blended other black <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” />

    with the change of acWriteTextEx(FCommonData.FCacheBmp.Canvas, PacChar(Caption), true, rText, Fmt, FCommonData, ControlIsActive(FCommonData) and not ReadOnly);

    its also blended on the lmdpanel.. so then its working always <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” />

    #39602
    Support
    Keymaster

    Thank you.
    Unfortunately I haven't LMD now and can't recompile.
    Could you show a screenshot of disabled control with unchanged sCheckBox.pas?

    #39639
    shadow_tj
    Participant

    litle problem is that i already changed the code production.
    so can not change it back at this moment because we need to deliver production version these days.

    so hopefully have more time in 2 weeks.

    greetings,

    shadow_tj

    #39640
    shadow_tj
    Participant

    im marking all the changes… and every time i nisert a new version of alphaskin to production i loko at the changes with beyond compare <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” />

    this way i can also see the latest changes.. specialy the fix list is very short in the readme.. most of the time there is written fixed a lot of litle bugs.
    but wich things are changed is not documented.. so i can see the changes myself.

    also found something strange..

    procedure TsDBDateEdit.EditingChange(Sender: TObject);
    begin
    if FDataLink.Editing and DefaultToday and (FDataLink.Field nil) and (FDataLink.Field.AsDateTime = 0) then
    FDataLink.Field.AsDateTime := SysUtils.Now;
    end;

    but at somewhere else is used

    procedure TsDBDateEdit.DataChange(Sender: TObject);
    begin
    if FDataLink.Field nil then begin
    EditMask := GetDateMask;
    Self.Date := FDataLink.Field.AsDateTime;
    end
    else begin
    if csDesigning in ComponentState then begin
    EditMask := '';
    EditText := Name;
    end
    else begin
    EditMask := GetDateMask;
    if DefaultToday then Date := SysUtils.Date
    else Date := 0;
    end;
    end;
    end;

    the data change is used SysUtils.date.. but EditingChange is using Now… the now has also a time stamp.
    why is in the EditingChange not used SysUtils.date also ??

    #39789
    Support
    Keymaster

    QUOTE (shadow_tj @ Jun 18 2009, 10:58 AM)
    the data change is used SysUtils.date.. but EditingChange is using Now… the now has also a time stamp.
    why is in the EditingChange not used SysUtils.date also ??


    Difference only is in time part of value. Date have defined Time to 0
    But, you are right, Date function will be used in both procedures.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.