Drop down buttons?

Drop down buttons?

Postby Ollie » Wed May 30, 2007 2:36 pm

Can I create a 'drop down' button - I'm not sure if this is the correct terminology.

I want the user to either add a COMPANY or CONTACT PERSON, I can do this with 2 buttons :

Code: Select all  Expand view  RUN
DEFINE BUTTON oButton1 OF oButton_Bar PROMPT "Add1" ACTION add_COMPANY() TOOLTIP "Add a new COMPANY"

   DEFINE BUTTON oButton2 OF oButton_Bar PROMPT "Add2" ACTION add_CONTACT() TOOLTIP "Add a new CONTACT PERSON"


...but it would be slicker if the user could click the 'Add' button and then get a choice of 'Add Company' or 'Add Contact' (Like you can do with MENUITEM)
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby Antonio Linares » Wed May 30, 2007 3:48 pm

Ollie,
Code: Select all  Expand view  RUN
   MENU oMenuNew POPUP
      MENUITEM "New &Company" RESOURCE "Company"
      MENUITEM "New Contact &Person" RESOURCE "Person"
   ENDMENU

   DEFINE BUTTON OF oBar  ;
      TOOLTIP "New" NOBORDER RESOURCE "New" MENU oMenuNew

The RESOURCEs "Company", "Person" and "New" are 16x16 bitmaps
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ollie » Wed May 30, 2007 5:00 pm

Cool !! 8)
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 96 guests