Page 9 of 14 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 137

Thread: thinBasic 1.10.7.x

  1. #81
    oooh! I'm looking at PDF. Lots of very interesting stuff there, Eros. Really hope you can find time to get round to documenting/adding help for it all...
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  2. #82
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21
    Hi Eros,
    It seems a lot of work has done behind the scene. Thank you for your hard work. While inspecting the pdf you posted here, i've noticed the <Control Property GET/SET:<ControlName>.BackColor. I wonder how that works internally, especially when we used buttons. I mean, i am trying to do it in FreeBasic but i can't set my button back color. I can see that my buttons have a colored outline instead of a complete back color. These are the steps i followed.
    Case WM_CTLCOLORBTN message,
    Get dc_handle from wparam
    SetBkMode(dc_Handle, Transparent)
    SetBkColor(dc_Handle, myColor)
    Set hBrush with CreateSolidBrush(myColor)
    Return hBrush

  3. #83
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Not all properties are available for all controls.
    Button is one of those that do not allow changing colors.

    Have a look at attached personalized XPButton create by Jose Rocha years ago.
    It is Power Basic code, not far from FreeBasic code. Maybe you can get ideas.

    You can also see thinBasic example of XPButton integration executing scripts in \thinBasic\SampleScripts\UI\XPButton\

    Ciao
    Eros
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by ErosOlmi; 18-04-2018 at 21:13.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #84
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21
    Hi Eros,
    Thanks for the reply.
    I saw the xpButton in sample scripts. Let me study the Josep Roca's code.

  5. #85
    XpButton is available in my WinFBX framework for PowerBasic. It has been implemented a class in the file CXpButton.inc.

    BTW I wrote it to demonstrate the use of visual styles, not to change the button background color. I never have had any interest in colored buttons or other controls because they can look horrible if the user selects a different theme.

  6. #86
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Attached an old code I took from PowerBasic forum years ago.
    It shows how to own draw a button.
    Code is to adapt to your needs but can show how to draw a button

    Also found this thread that can help: https://forum.powerbasic.com/forum/u...nerdraw+button

    As José said ... results can be horrible
    Attached Images Attached Images
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  7. #87
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21
    @Josep Roca,
    Thanks for the reply. I know that it looks horrible when you change the system theme. But I want to make a custom button control just for a practice. I just tried and experimented with the code you posted on FreeBasic forum. It worked but the back color is only changed behind the button text area, not the full rect of button. By the way, i have some questions related to CWSTR.inc Which is the best forum to ask it ?

    @Eros Olmi,
    Thanks for the code sample and the link. Let me check.

  8. #88
    > By the way, i have some questions related to CWSTR.inc Which is the best forum to ask it ?

    http://www.planetsquires.com/protect/forum/index.php

  9. #89
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21
    @Jose Roca,
    Thanks.

  10. #90
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    myWindow(1).Caption = myBMP(1).Filename

    Can just read but not try out yet.
    Just one thing: old vb6-controls (and windows) also had an Index so if we have let's say a few windows of the same type that show a bitmap where we draw unto then it was possible to give them all the same name only they had different indexes so these windows can share the same subs or functions. For the event-subs it's easy the user just might use one of the 4 user-values attached to every UI-"object", but if you think about setting properties:
    Text1(1).Text = "Hello"
    Text1(2).Text = "world!"
    
    it would be worth to think about to add an index-property to all UI-things that have a name also
    I think there are missing some Forum-sections as beta-testing and support

Page 9 of 14 FirstFirst ... 7891011 ... LastLast

Members who have read this thread: 3

Posting Permissions

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