FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Drop down buttons?
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
Drop down buttons?
Posted: Wed May 30, 2007 02: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 :

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)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Drop down buttons?
Posted: Wed May 30, 2007 03:48 PM
Ollie,
   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
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
Drop down buttons?
Posted: Wed May 30, 2007 05: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)

Continue the discussion