Raccoon

Forum Replies Created

Viewing 20 posts - 1 through 20 (of 31 total)
  • Author
    Posts
  • in reply to: TacTitleItem Question #56498
    Raccoon
    Participant

    Nice, both methods work :a3:

    Thank you very much for your help!

    Best regards

    Alex

    in reply to: TacTitleItem Question #56478
    Raccoon
    Participant

    Nice, thank you :a3:

    in reply to: TacTitleItem Question #56476
    Raccoon
    Participant

    Hi there,

    on paint method works well :a3:

    Just one more question 😕

    I attached one screenshot.

    You see the TsFloatButton on top of the form. The lower “Flag” is a TPaintBox with the same Bitmap. As you can see the fontstyle differs between them. Do you have any tipp, how I can make the TsFloatButton looks like the PaintBox?

    Here is my code:

    Code:

    __fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
    {
    //Get the Bitmap and preset Width and Height of TsFloatButton (AutoSize=false) outside of the OnPaint Event
    TBitmap *ABMP = new TBitmap();
    DrawFlag(ABMP);

    btn->Items->Items[0]->Height = ABMP->Height;
    btn->Items->Items[0]->Width = ABMP->Width;
    delete ABMP;
    }
    //—————————————————————————

    void __fastcall TForm1::btnItems0Paint(TObject *Sender, TacCustomPaintData PaintData)
    {
    //paint it
    DrawFlag(PaintData.DestBmp);
    }
    //—————————————————————————

    void __fastcall TForm1::DrawFlag(TBitmap *AToBitmap)
    {
    if(!AToBitmap)
    return;

    static const int FLAG_TEXT_MARGIN = 56;
    TBitmap *bmpFlag = new TBitmap();
    TBitmap *bmpBackground = new TBitmap();
    imgl->GetBitmap(0, bmpBackground);

    bmpFlag->Canvas->Font->Name = “Trebuchet MS”;
    bmpFlag->Canvas->Font->Size = 11;
    bmpFlag->Canvas->Font->Style = TFontStyles() << fsBold;
    bmpFlag->Canvas->Font->Color = clWhite;
    bmpFlag->Canvas->Brush->Style = bsClear;

    UnicodeString asText = “Hello, I'm a topic. My current date is: “;
    TDateTime dtNow;
    dtNow = dtNow.CurrentDate();
    int iTextWidthText = bmpFlag->Canvas->TextWidth(asText);
    int iTextWidthDate = bmpFlag->Canvas->TextWidth(” ” + dtNow.DateString());

    int iGesWidth = iTextWidthText + iTextWidthDate;
    if(iGesWidth+FLAG_TEXT_MARGIN Width)
    {
    bmpFlag->SetSize(bmpBackground->Width, bmpBackground->Height);
    }
    else
    {

    int iNewWidth = iGesWidth + FLAG_TEXT_MARGIN;
    bmpFlag->SetSize(iNewWidth, bmpBackground->Height);
    }

    bmpFlag->Canvas->CopyRect(TRect(0,0,bmpFlag->Width, bmpFlag->Height), bmpBackground->Canvas, TRect(0,0,bmpBackground->Width, bmpBackground->Height));

    bmpFlag->Canvas->TextOutW((bmpFlag->Width – iGesWidth)/2, (bmpFlag->Height – bmpFlag->Canvas->TextHeight(asText))/2, asText + ” ” + dtNow.DateString());

    //pb is the TPaintBox
    pb->Canvas->Draw(0,0,bmpFlag);

    AToBitmap->Assign(bmpFlag);
    delete bmpBackground;
    delete bmpFlag;
    }
    //—————————————————————————

    It seems that the Bitmap in the TsFloatButton is a little bit squeezed?!

    Thank you very much for your help.

    Alex

    in reply to: TacTitleItem Question #56475
    Raccoon
    Participant

    Oh, no…I didnt know 🙂

    I will try it and reply here.

    Thank you very much!

    Alex

    in reply to: TacTitleItem Question #56473
    Raccoon
    Participant

    Thank you for the reply.

    Any chance to get a Bitmap Option there?

    I wanted to use the new TsFloatButton to create a Button which has a Bitmap with variable Width. On that Bitmap I'm drawing a text. The Width is depending on Textwidth, so that the Bitmap might be greater than 256px.

    I tried with VirtualImageList, but without success.

    Best regards

    Alex

    in reply to: TacTitleItem Question #56448
    Raccoon
    Participant

    Hi, its me again.

    This component is really cool.

    But is there a way to set directly a bitmap/glyph of a single item without using an imagelist?

    Thanks in advance

    Alex

    in reply to: TacTitleItem Question #56460
    Raccoon
    Participant

    Ok, my fault 🙁

    I have forgotten to start CX with Adminrights…

    in reply to: TacTitleItem Question #56457
    Raccoon
    Participant

    Wow, this looks great!

    I wanted to try it out, but unfortunately I get some linker errors when compiling the new package.

    Maybe you can help me out.

    When compiling acntCX10_R.cbproj I get linker error see attached image.

    I deleted old files in C:UsersPublicDocumentsEmbarcaderoStudio17.0DCP and BPL.

    I searched complete C: after *acnt* there are no files left.

    Do you have any hint, what maybe wrong?

    Thanks in advance.

    in reply to: TacTitleItem Question #56442
    Raccoon
    Participant

    Any news here?

    Best regards

    Alex

    in reply to: Font Color TsCalendar #56126
    Raccoon
    Participant
    'Support' wrote:

    Hello! Check a font color in the 'PANEL' skin section.

    Or maybe you can send me this skin for checking?

    Thanks for the reply.

    Problem was that “TRANSPARENCY = 100” was set in PANEL Skinsection.

    Best regards

    Alex

    in reply to: BorderStyle problem #56116
    Raccoon
    Participant

    And here two screenshots.

    Best regards Alex

    in reply to: BorderStyle problem #56115
    Raccoon
    Participant

    Hi,

    find a demo project attached.

    I included the Skin i'm using as well. But I tested it with several skins, but maybe you find something.

    AlphaControls Vers.: 11.21

    Best regards Alex

    in reply to: Font Color TsCalendar #56114
    Raccoon
    Participant

    Here is my problem. Dont want the days painted in Fuchsia 🙁

    in reply to: TacTitleItem Question #55998
    Raccoon
    Participant
    'Support' wrote:

    I'm working with it, I will be able to give you a beta release for tests soon.

    Nice 🙂

    Thank you. Looking forward to it.

    Best regards

    Alex

    in reply to: TacTitleItem Question #55982
    Raccoon
    Participant

    Any news here?

    Best regards

    Alex

    in reply to: TacTitleItem Question #55477
    Raccoon
    Participant

    Thanks for the reply.

    Looking forward for some news 😉

    Best regards

    Alex

    in reply to: TacTitleItem Question #55772
    Raccoon
    Participant

    Any news here?

    Best regards

    Alex

    in reply to: TacTitleItem Question #55670
    Raccoon
    Participant

    Nice,

    that would be great.

    Thank you very much.

    Alex

    in reply to: TacTitleItem Question #55696
    Raccoon
    Participant
    'Support' wrote:

    Maybe you should just change the SkinSection property of this TitleItem to 'TRANSPARENT'?

    Item will not be changed visually in this case, but clicking will work…

    Thank you very much for your reply.

    I think 'TRANSPARENT' would work. But the item is not overlapping client area, if the cursor is not inside the item.

    Is there a way to lock the item in the “mouseenter” state (drawing in Titlebar and overlapping to the client area)?

    Best regards

    Alex

    in reply to: TacTitleItem Question #55685
    Raccoon
    Participant
    'Support' wrote:

    Hello!

    You tried the “bsInfo” style of the item?

    Maybe you can show a demo with the problem? I will try to find a solution.

    Hi,

    thanks for the reply.

    Yes, I tried bsInfo, but the Clickevent is disabled and the “flag” is only drawn in the titelbar. Its not overlapping to the client area as Mouseover bsMenu does.

    I tried to draw it by myself with WM_NCPAINT, WM_NCACTIVATE, but AC seems do overwrite these events by itself.

    Best regards

    Alex

Viewing 20 posts - 1 through 20 (of 31 total)