Hi,
Wx::BitmapComboBox has the Wx::ComboBox API which I don't think supports
GetPopupControl directly. Depending on platform, it might return you a
Wx::ComboCtrl but I think that only the API supported in Wx::ComboBox can be
relied upon to perform in the way you expect.
If Wx::BitmapComboBox did support 'GetPopupControl' , I think 'First Step' if you
want a custom popup would need to be $combo->SetPopupControl($myobj); where
$myobj is an instance of a custom class derived from Wx::PlComboPopup.
PaintComboControl is a 'callback' that you would override in a class derived
from Wx::PlComboPopup, e.g.
sub PaintComboControl {
my ($self, $dc, $rect) = @_;
.... draw on $dc within $rect
Regards
Mark
Ruben Vareljyan wrote:
my $choices = [ 'This', 'is one of my', 'really', 'wonderful', 'examples', ];
my $combo = Wx::BitmapComboBox->new($self,-1,"This",[2,2],[10,10],$choices );
############################################################################
#First Step
my $PopupControl = $combo->GetPopupControl();
#There ---------- wxComboPopup::GetControl
$PopupControl->GetControl();
#=================ERROR
Can't locate object method "GetControl" via package "Wx::ComboPopup" at ...
############################################################################
#Try To Another
my $PopupControl = $combo->GetPopupControl();
my $rectIem = Wx::Rect->new(0, 0, -1, -1);
my $dc00 = Wx::MemoryDC->new();
# ...
#There ----------wxComboPopup::PaintComboControl
$PopupControl->PaintComboControl($dc00, $rectIem);
#=================ERROR
variable is not of type Wx::PlComboPopup at ...
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks, Regards Gnome.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ