Inplace button appearance |
Post Reply |
Author | |
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
Posted: 30 October 2006 at 9:06am |
Hello,
is it possible to modify the appearance of the inplace button apart from writing a special OnPaint routine? I want to set my own text as caption for the button and my own callback function. Best regards, Holger |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Sorry, you can draw it with own style but size always will be GetSystemMetrics(SM_CXHTHUMB) :(
We are going improve it soon.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
|
Hello Oleg,
thanks for your answer. I found another solution for my problem: According to the custom spin-button element in property-grid sample I implemented a 'normal' button for property-grid items. So I can set size and text of the button and by handling the BN_CLICKED notification of the button I can call a user-given callback function:-) Implementation is straightforward: Given the spin-button element just replace the CSpinButtonCtrl with a C(XT)Button and the UDN_DELTAPOS notification with BN_CLICKED. If someone is interested in the source code let me know and I will post it here (but at the moment there are still some problems with getting the keyboard focus, maybe someone has a hint on how the button can get the keybord focus). Bye Holger |
|
randob1
Newbie Joined: 01 November 2006 Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Not sure if my focus issue will relate to yours but due to how we implement the inplaceButton I could not Tab into or out of any buttons. I wound up having to use a combination of the OnNavigate method and PreTranslate. This is why my situation may not help. In my case the buttons, if they exist, proceed an inplace edit control. OnNavigate was triggered for all the grid controls except the buttons, so if the buttons existed and current grid item was an edit control I could use Windows API to get the focus to the buttons. To get back from the buttons I used PreTranslate where I checked for Tab keydown and the shift key. If I was on the last button and tab was selected, I would then simply set focus to the parent control, again with windows API. The shift/tab was kind of a hack, if I needed to get back to the edit from the fist button. I set focus to the parent control and then called OnNavigate to move forward once more so that to the user it would appear that we navigated back one instead of forward twice. Hope this gives you some ideas. |
|
farr02
Groupie Joined: 10 May 2005 Status: Offline Points: 51 |
Post Options
Thanks(0)
|
Thanks for your answer, I will try it.
Bye Holger |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |