Hi,
In a lot of modern webbased applications I saw buttons in a button. This kind of sub-buttons gives the possibility to add extra functionality to a button.
Sample: Stock button gives a list of products. The '+' button adds a new product. This way a user just has to click once.
As you can seen in the sample above, I have two buttons. The little push-button has another action according to the big Stock button.
The problem I now have is that when the STOCK button is clicked, the '+' button disappears to the back of the stock button. I'm looking to put the '+' button to front.
I tried with a oStockPlus:refresh() in the action of the stock button, but that doesn't work.
Any suggestions for this?
A button in a button
Re: A button in a button
Hi,
I found it.
Using oStockButton:toback() solved my problem.
I found it.
Using oStockButton:toback() solved my problem.
Re: A button in a button
Hello,
looking nice your botton combination. A little tip: you can make the small button round with RADIUS in dcpushbuttonxp, I think this would look better.
regards
Rudolf
looking nice your botton combination. A little tip: you can make the small button round with RADIUS in dcpushbuttonxp, I think this would look better.
regards
Rudolf
Re: A button in a button
Hi Rudolf,
Yes, the sample was made to show the two buttons.
This is how I implemented it in my application. I changed the pushbuttonxp class with some extra:
:borderpixel to create a thick border which automatically calculates the color of the border.
:bgparent to set the background color of big button.
:circle which uses graarc to draw the button.
This way I can define my little buttons in a big button.
Yes, the sample was made to show the two buttons.
This is how I implemented it in my application. I changed the pushbuttonxp class with some extra:
:borderpixel to create a thick border which automatically calculates the color of the border.
:bgparent to set the background color of big button.
:circle which uses graarc to draw the button.
This way I can define my little buttons in a big button.
Re: A button in a button
You are saying that you modified the DC_XbpPushButtonXP() class?
I am planning another quick release of build 266.
I would like to see this plus your application code.
I am planning another quick release of build 266.
I would like to see this plus your application code.
The eXpress train is coming - and it has more cars.
Re: A button in a button
Hi Roger,
I don't mind to share code, but I expect that my dc_pushbuttonxp isn't compatible anymore.
If you send me your _dcxbutt.prg, i can add the above modifications.
I didn't change the pushbuttonxp command, since I'm using the eval clause to set some values. I won't be a problem to add this to dcdialog afterwards.
1. The standard border has a value of one. I modified this with :borderpixel. If the borderpixel if > 1, then the color is calculated based on the :bgcolor of the current state. This way the bordercolor changes according to the standard bgcolor, bgmousover and bgselected.
2. The :bgparent sets a :bgcolor if there is no specific parent. The big button is not the parent of the small button, so I needed an extra value to define this. This way you can put the small button above another.
3. If :circle = .T. it is a sub-button in my case. This way I test on the :bgparent to paint the grabox. I also use the graarc to paint the button, instead of using the grabox with a radius of 999.
I don't know if the modifications are generic. Maybe you can change them to have some kind of subbutton clause in the command.
To have the above working in a nice way, the o:bgColorMouse:=o:bgcolor for the big button is a must.
If you think this is an addition to eXPress++ and users find this of interest I can share it.
I don't mind to share code, but I expect that my dc_pushbuttonxp isn't compatible anymore.
If you send me your _dcxbutt.prg, i can add the above modifications.
I didn't change the pushbuttonxp command, since I'm using the eval clause to set some values. I won't be a problem to add this to dcdialog afterwards.
1. The standard border has a value of one. I modified this with :borderpixel. If the borderpixel if > 1, then the color is calculated based on the :bgcolor of the current state. This way the bordercolor changes according to the standard bgcolor, bgmousover and bgselected.
2. The :bgparent sets a :bgcolor if there is no specific parent. The big button is not the parent of the small button, so I needed an extra value to define this. This way you can put the small button above another.
3. If :circle = .T. it is a sub-button in my case. This way I test on the :bgparent to paint the grabox. I also use the graarc to paint the button, instead of using the grabox with a radius of 999.
I don't know if the modifications are generic. Maybe you can change them to have some kind of subbutton clause in the command.
To have the above working in a nice way, the o:bgColorMouse:=o:bgcolor for the big button is a must.
If you think this is an addition to eXPress++ and users find this of interest I can share it.
Re: A button in a button
I was not thinking of it as an addition to eXpress++.If you think this is an addition to eXPress++ and users find this of interest I can share it.
I thought it may have been something minor that would help you out with future releases.
I will forget about it and let you go about your business.
The eXpress train is coming - and it has more cars.
Re: A button in a button
Hi Roger,
This is the result of my button in a button. I can easily add extra subbuttons on a button. The main goal was to have as much of direct options with ONE click.
This is the result of my button in a button. I can easily add extra subbuttons on a button. The main goal was to have as much of direct options with ONE click.