Results 1 to 8 of 8

Thread: Form question

  1. #1
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default Form question

    Is it possible to change the color of tabs or buttons?
    METAL HEAD FOR LIFE!!!

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    I'm not sure, but you could make a TImage of a button and use that instead (just a thought).

  3. #3
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    you could use a TSpeedbutton or a tbitbutton and then use an bitmap on their canvas to draw a different color. As far as i know, changing the buttons actual colors to be different from the background of the form doesnt work in SCAR.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    I created a TTabController using Images, it can be done. That way, you can manipulate all the tabs via Canvases and Bitmaps!

    Feel free to ask me if you need some help..

    No, I don't still have the code
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    you could use a TSpeedbutton or a tbitbutton and then use an bitmap on their canvas to draw a different color. As far as i know, changing the buttons actual colors to be different from the background of the form doesnt work in SCAR.
    Could you give me a little code demonstration? I'm still getting oriented with all this form stuff

    @Nava sweet, sent ya a pm
    METAL HEAD FOR LIFE!!!

  6. #6
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    I created a TTabController using Images, it can be done. That way, you can manipulate all the tabs via Canvases and Bitmaps!

    Feel free to ask me if you need some help..

    No, I don't still have the code
    Completely off topic/spam, but it was an unreal form (from what I saw).

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Completely off topic/spam, but it was an unreal form (from what I saw).
    I died a little inside when I lost it.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #8
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    button := TSpeedbutton.create(frmdesign);
        with button do
        begin
          Parent := frmdesign;
          Flat := true;
          SetBounds(1,1, 17, 17);
          Glyph.Width := 16;
          Glyph.Height := 16;
          SafeCopyCanvas(getbitmapcanvas(imageImCopying), Glyph.Canvas, 0, 0, 16, 16, 0, 0, 16, 16);
        end;
    something like that i guess. Depends on how you want it. If the bitmap has a background that you dont want to use then you'll need to do fastdrawtransparency if you didnt know that, but otherwise thats about it, i think.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •