Class: Fzeet::ComboBoxEx

Inherits:
Control show all
Includes:
ComboBoxExMethods
Defined in:
lib/fzeet/windows/comctl/ComboBoxEx.rb

Constant Summary collapse

Prefix =
{
	xstyle: [:cbes_ex_, :ws_ex_],
	style: [:cbs_, :ws_],
	message: [:cb_, :cbem_, :ccm_, :wm_],
	notification: [:cbn_, :cben_, :nm_]
}

Constants included from WindowMethods

WindowMethods::EnumChildProc

Instance Attribute Summary

Attributes inherited from Control

#id, #parent

Instance Method Summary collapse

Methods included from ComboBoxMethods

#[], #textlen

Methods included from ListBoxMethods

#[], #append, #clear, #each, #length, #selected=, #textlen

Methods inherited from Control

crackNotification, #dispose

Methods included from WindowMethods

#[], #capture=, #capture?, #dialog=, #dialog?, #dlgmsg?, #drawMenuBar, #eachChild, #enabled=, #enabled?, #focus=, #focus?, #invalidate, #location, #location=, #long, #menu, #menu=, #message, #paint, #position, #position=, #postmsg, #question, #rect, #reframe, #sendmsg, #show, #size, #size=, #style, #style?, #text, #text=, #textlen, #topmost=, #topmost?, #update, #visible=, #visible?, #xstyle, #xstyle?

Methods included from Toggle

#toggle

Constructor Details

#initialize(parent, id, opts = {}, &block) ⇒ ComboBoxEx

Returns a new instance of ComboBoxEx.



81
82
83
84
85
# File 'lib/fzeet/windows/comctl/ComboBoxEx.rb', line 81

def initialize(parent, id, opts = {}, &block)
	super('ComboBoxEx32', parent, id, opts)

	@parent.on(:command, @id, &block) if block
end

Instance Method Details

#on(notification, &block) ⇒ Object



87
88
89
90
91
92
93
94
95
# File 'lib/fzeet/windows/comctl/ComboBoxEx.rb', line 87

def on(notification, &block)
	if (notification = Fzeet.constant(notification, *self.class::Prefix[:notification])) < Windows::CBEN_LAST
		@parent.on(:command, @id, notification, &block)
	else
		@parent.on(:notify, @id, notification, &block)
	end

	self
end