[Implemented] GetGadgetType(handle)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

[Implemented] GetGadgetType(handle)

Post by Tranquil »

Hi PureTeam and Fred!

It would be very nice to have a command that returns a Value that defines the type of the PB Gadget.

Example:

Value.l = GetGadgetType(handle)

Returns as Result
#PB_GadgetType_ComboBox


That would enable the user to do some common CallBack-Stuff for different GadgetTypes without holding these information in LinkesLists.

Just an Idea.

Cheers
Mike
Tranquil
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Try this (is not the same thing... but...)

Code: Select all

Procedure.s GetGadgetType(gadget)
  class$=Space(255) : GetClassName_(GadgetID(gadget),class$,255)
  ProcedureReturn class$
EndProcedure
PB 6.21 beta, PureVision User
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It's a good idea, we will add this.
Post Reply