How to configure Combobox from Gui Builder? - codenameone

I can not make combobox from gui builder.
I drag and drop a combobox into place from Components Pallete/Core Combonets.
I am setting two values as is shown in the screen shot bellow:
I am saving the From in the gui builder and then I hit the run on netbeans. On simulator the combobix is shown empty as you can see on the next screenshot:
am I dong something wrong?

This seems to be a bug in the GUI builder. We generally recommend avoiding combo boxes so people don't test this much. Please file an issue here. As a workaround just use setModel within the constructor and define the elements that go in.

Related

CodenameOne GUI Builder Button Image Problem

The CodenameOne GUI Builder seems to have a mind of its own..
I created a simple form with a button that has a green image when it is enabled and red when disabled. In my code I use another button to call an event function that enables and disables the button.
This seems pretty simple, yet it doesn't work reliably. The button's image changes between green and transparent as it toggles. Other times it works correctly. After I make a change I always do a 'save' and a 'regen' in the GUI Builder and then 'Clean and Build' in NetBeans.
Also, the size of my image is much smaller in the simulator than in the GUI Builder.
GUI Builder is sooo frustrating; I wish I could just code the for using html and css :(
Any suggestions would be appreciated.
Please see my video capture (https://siscocircuits.com/cno_gui_builder_problem.wmv) which shows the problem in action.
You can write code in Java to represent the GUI. In fact that's what the GUI builder does under the surface and that's what most of our demos do. We also support a form of CSS.
The problem with the image sizes is probably due to the fact that you used regular images instead of multi-images to adapt to the various DPIs. I suggest reviewing the generated code to see what went wrong it's a bit difficult to see in the video but you can put a breakpoint in the debugger and step over the generated code.

DevExpress PivotGrid (Silverlight) : Popup Menus don't popup

We are using DevExpress Silverlight PivotGrid (11.2.7). The problem is that none of the popups work as one would expect.
Here is the xaml code (note that all of these properties are True by default and don't need to be set)
<dxpg:PivotGridControl
x:Name="pivotGrid"
... data bindings ...
IsFieldValuePopupMenuEnabled="True"
IsHeaderMenuEnabled="True"
IsHeaderAreaMenuEnabled="True"
/>
Once the host control for the grid is shown and the data is loaded right-clicking on any of the relevant areas doesn't bring either of the popups (there are 3).
Strangely (or not so strangely) in the sample SL project provided by devex everything works as it should.
The one (significant) difference between the sample app and our project is that we are using MEF and relevant .xaps are loaded dynamically based on which user logged in and some other stuff.
We have tried a lot stuff to figure out what is wrong but haven't managed to find anything even remotely relevant. Here is what we have tried :
Adding the pivotgrid to the host tabpage in codebehind after imports have been satisfied;
Setting / resetting properties mentioned above after imports from codebehind;
Adding the control to the startup page of the project before the MEF madness kicks in;
We also tried to popup the menus manually by inheriting from the pivotgrid control, but that has not yielded much;
Enabled RedrawRegions to make sure the popup is not popping 'under'. It's not;
Any pointers or ideas would be greatly appreciated.
Regards,
Alex
It appears that this was some bug in the version we were using at the time.
After updating to 12.1 everything works like it should without any tinkering from our side.
Looks like devex guys have bugs too...who knew right :)

Question about changing dialog box layout

Hey, I just got started designing dialog boxes and windows forms, and I had a basic question.
When you use something like a windows installer, it has a next button, and when you click it the dialog completely changes layout in moving on to the next step. My question is, is this done by loading a completely new dialog box and getting rid of the previous one. Or is there some way of making a dialog with multiple pages/states (not sure what to call them).
Thanks in advance for any help.
Wizards are usually made using the property sheet control from the Common Controls library. They do not create a new dialog, but use something similar to tab pages instead.

How to override default drag&drop cursors when the darg source is outside my application

In Drag&Drop, if I want to customize the cursors, I can subscribe to GiveFeedback on the drag source and set e.UseDefaultCursors = false, and the render the content I want.
But that only work if the drag source is my application. If I want to do the same when dragging files from explorer, for example, I can not subscribe to that event because I only have access to the drop target and not to the drag source.
Is there any other way to disable the built in cursors and copy and link signs so I can render my own in that case?
Hmm... this probably wont help at all (i hope it does somehow) but in visual basic, using a language in the .NET Framework, when creating a form, there is an option for drag and drop to disable it, so whatever compiler your using, there maybe some sort of option in there.
I would look specifically at what you are working with and read up on the drag and dropping, so maybe something to do with a form/GUI.
I hope this has helped in some way, if not, i apologize and gl.

How can I make a Windows Explorer file preview screen in WPF?

I'm working on an application that will have attachments, and I would like to create a type of display like in windows Explorer, where you choose a "Details" view, and also show the preview pane.
I would like to be able to show a thumbnail view of the attached file currently selected, based on the file extension.
Does anyone know where I can start to look for examples on how to pull this off?
I know Outlook 2007 can also do something similar using preview handlers. I think that’s going to be the direction I want to go in, but I'm not sure where to start.
Many thanks.
All Hail the Glory of the Hypnotoad!
While you could do it in WPF, you should not do it.
Seriously: don't do it! - you would break many apps (including one of mine).
To do this without .NET, see here for a nice guide.
I think you can start here
http://blogs.microsoft.co.il/blogs/eyal/archive/2007/07/29/Hosting-vista_2F00_office-2007-previewers-in-winform-application.aspx
(the code is partially black on black, at least for me, but you can disable the styles or just copy it)

Resources