Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
ThreadSearch 0.7 release
Pecan:
Is there a way to get rid of that little window on the left?
It's too small for me (old eyes), and it just gets in the way of my reading the search results.
dje:
--- Quote from: Pecan on June 29, 2007, 07:37:16 pm ---Is there a way to get rid of that little window on the left?
--- End quote ---
Not for now. The minimum width is 25px.
I put it on my to-do list, if I can hide widgets and directories items, I should succeed in hiding editor ! :D
Dje
Pecan:
--- Quote from: dmoore on June 29, 2007, 07:25:12 pm ---hmm... it would be possible to specify a sequence of wxBitMaps in an XRC file as follows:
--- Code: ---<resource>
<object class="wxBitmap" name="img1">images/image1.png</object>
<object class="wxBitmap" name="img2">images/image2.png</object>
etc...
</resource>
--- End code ---
zip the XRC in with the images and manifest (using the relative paths for the images as in the xrc). Then after you call
--- Code: ---Manager::LoadResource(_T("myplugin.zip");
--- End code ---
you can access your images with
--- Code: --- wxBitmap bmp;
// typedef
bmp = wxXmlResource::Get()->LoadBitmap(_T("img1"));
--- End code ---
--- End quote ---
After three hours of trying. I think I'll give this one up.
It doesn't complain, but it doesn't load the images either.
ThreadImages.xrc
--- Code: ---<?xml version="1.0" encoding="utf-8"?>
<resource>
<object class="wxBitmap" name="findf"><bitmap>findf.png</bitmap></object>
<object class="wxBitmap" name="findfdisabled"><bitmap>findfdisabled.png</bitmap></object>
<object class="wxBitmap" name="options"><bitmap>options.png</bitmap></object>
<object class="wxBitmap" name="optionsdisabled"><bitmap>optionsdisabled.png</bitmap></object>
<object class="wxBitmap" name="stop"><bitmap>stop.png</bitmap></object>
<object class="wxBitmap" name="stopdisabled"><bitmap>stopdisabled.png</bitmap></object>
<object class="wxBitmap" name="ThreadSearch"><bitmap>ThreadSearch.png</bitmap></object>
<object class="wxBitmap" name="ThreadSearchoff"><bitmap>ThreadSearch-off.png</bitmap></object>
</resource>
--- End code ---
Files in ThreadSearch.zip
--- Code: ---findf.png
findfdisabled.png
manifest.xml
options.png
optionsdisabled.png
stop.png
stopdisabled.png
ThreadImages.xrc
ThreadSearch.png
ThreadSearch-off.png
--- End code ---
--- Code: --- if (!Manager::LoadResource(_T("ThreadSearch.zip")))
{
NotifyMissingFile(_T("ThreadSearch.zip"));
}
......
wxBitmap bmp = wxXmlResource::Get()->LoadBitmap(_T("findf"));
wxBitmapButton* pBtnSearch = new wxBitmapButton(toolBar, idBtnSearch, bmp);
--- End code ---
It just seems to do nothing. Even when I change the name of the .png to one that doesn't exist, it doesn't even error out.
It always just shows the button without the bitmap.
dmoore:
Pecan: strange that it doesn't work... I assume you tried without enclosing the filename in <bitmap></bitmap>
EDIT: seems to be working fine for me when I exclude the <bitmap> tokens
Pecan:
Edit: I seem to have it working now. But I have no idea how I did it; or what was wrong before.
--- Quote from: dmoore on June 29, 2007, 10:18:34 pm ---Pecan: strange that it doesn't work... I assume you tried without enclosing the filename in <bitmap></bitmap>
EDIT: seems to be working fine for me when I exclude the <bitmap> tokens
--- End quote ---
Nope. Can't get it to work with or without the <bitmap></bitmap> tokens.
What system are you on. I'm on XpSp2 wx284
If you have it working, could you give us a patch?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version