Sign in to follow this  
Followers 0
twbradio

Color a Button

21 posts in this topic

Is there a way to set the background color of a button?


Anyone have a TRS 80 Model III for sale?

Share this post


Link to post
Share on other sites



I don't think there is a way, at the moment.


FootbaG

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

you mean like this?

color_buttons.bmp

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

that sooo has to be an april fools joke, show us the code then :) !


FootbaG

Share this post


Link to post
Share on other sites

Assuming this isn't an april fools joke, yep - like that.

Currently i am using labels in place of the buttons - they act like a button in onevent mode, but the gui isn't as nice.

you mean like this?

<{POST_SNAPBACK}>


Anyone have a TRS 80 Model III for sale?

Share this post


Link to post
Share on other sites

hehee ya i cheated

#include <guiconstants.au3>
GUICreate ( "", 100, 75 )
GUICtrlCreateButton ( "", 0, 0, 100, 25 )
GUICtrlCreateLabel ( "", 1, 1, 97, 22 )
GUICtrlSetBkColor ( -1, 0xff0000 )
GUICtrlCreateLabel ( "Red Button", 1, 5, 97, 17, $SS_CENTER )
GUICtrlCreateButton ( "", 0, 25, 100, 25 )
GUICtrlCreateLabel ( "", 1, 26, 97, 22 )
GUICtrlSetBkColor ( -1, 0x0000ff )
GUICtrlCreateLabel ( "Blue Button", 1, 31, 97, 17, $SS_CENTER )
GUICtrlCreateButton ( "", 0, 50, 100, 25 )
GUICtrlCreateLabel ( "", 1, 51, 97, 22 )
GUICtrlSetBkColor ( -1, 0x00ff00 )
GUICtrlCreateLabel ( "Green Button", 1, 56, 97, 17, $SS_CENTER )
GUISetState ( )
Sleep ( 2000 )

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

Well that's usefull... Hehe, right when I put my mouse over it, they change, so, I guess it's not possible to do it... :)


FootbaG

Share this post


Link to post
Share on other sites

yeah, i wish we could change the color and stuff. I guess for now we just have to do GuiCtrlCreateGraphic and GUIGetCursorInfo


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Found this yesterday......QHTM

the dll has functions that allow buttons and tooltips to display html

whether it works via dll call.....dunno. (haven't figured out dll calls yet...)

Anyone here that knows dll calls can try it out and see if it works

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

What are the limits of the DLL you found? the DLL i use for displaying HTML is cwebpage.dll


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Found this yesterday......QHTM

QHTM is the link to the site, the online docs are there also....

there are quite a few working C++ examples( Animated windows in 4 styles, Multi-threading template, etc...) that the developers might want to have a look at

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

That QHTM is very powerful and advanced. Much better than that cwebpage DLL.

Share this post


Link to post
Share on other sites

That guy has his sh@t together....wish he was an AutoIt dev...


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

That QHTM is very powerful and advanced. Much better than that cwebpage DLL.

<{POST_SNAPBACK}>

Get any of it to work with AutoIT?

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Not yet. I gotta go. I'll try later...

Edit:

This is hard. I believe this can only work in a C++ project.

Especially when a user clicks a QHTM link. When that happens, the DLL sends a message to the GUI to tell which link it was.

We can only intercept that message if the needed modifications in the AutoIt source are done.

Conclusion:

Not easy without C++ experience.

Edited by SlimShady

Share this post


Link to post
Share on other sites

how about the 'html' button??


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

I have read the documentation. Maybe you should too.

I have looked once and I don't see how we could make this work.

It's late here, I'll check tomorrow again.

Edited by SlimShady

Share this post


Link to post
Share on other sites

//  Call this to initialise the QHTM.
    BOOL WINAPI QHTM_Initialize( HINSTANCE hInst );

    //
    //  Call this to shutdown QHTM.
    BOOL WINAPI QHTM_Uninitialize();

    //  Enable CoolTips in an application that currently uses the WIN32 Tool Tip control.
    BOOL WINAPI QHTM_EnableCooltips();

    //  Enable HTML to be rendered onto a button
    BOOL WINAPI QHTM_SetHTMLButton( HWND hwndButton );

This is from the C++ header...don't know how to translate into AutoIt dll call.....


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

this should do it but im not sure about the initialize function

DllCall ( "qhtm.dll", "Initialize", "int", hInst )

DllCall ( "qhtm.dll", "Uninitialize" )

DllCall ( "qhtm.dll", "EnableCooltips" )

DllCall ( "qhtm.dll", "SetHTMLButton", "hwnd", hwndButton )

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

this should do it but im not sure about the initialize function

DllCall ( "qhtm.dll", "Initialize", "int", hInst )

DllCall ( "qhtm.dll", "Uninitialize" )

DllCall ( "qhtm.dll", "EnableCooltips" )

DllCall ( "qhtm.dll", "SetHTMLButton", "hwnd", hwndButton )

<{POST_SNAPBACK}>

so the 'return type' gets skipped altogether?

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0