Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox/listctrl with buttons as contents

Status
Not open for further replies.

Lorey

Programmer
Feb 16, 2003
88
SG
Please help

I need to have many buttons inside a tab control. But I have a limited screen size. Im thinking of having a listbox that can be scrolled down and whats inside is a list of buttons, arranged just like a buttons in a telephone. In this way, I can store many buttons inside a listbox that can be scrolled. this saves space. is this possible? please help. I'd be very thankful if you can give me a code done in VC++ MFC,

 
You can add the buttons in a panel or any container with also a vertical scroll bar. Then you have to set all the buttons' new coordinates (plus a constant offset).

Else,
add a listbox with some items. You should execute some blocks of code depending on which item was double clicked. If you need to use a button; set its text to e.g. "select" and when clicked get the selected index of the listbox and execute same way your code.


Hope this helps.
 
Thanks TipGiver.

But Im new to VC++ and dont know how to start. can you please give me a sample code to start with? :(
 
I'm sorry but i do not use mfc apps or c++. What i could do and did, was to give you some ideas on how to do this
:( too
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top