Search found 20 matches
- 26 Aug 2014, 16:56
- Forum: General Discussion
- Replies: 26
- Views: 15535
Re: Creating a button dynamically (C++)
Sure. Here's the XAML. It's commented so you have a better idea of what does what. The buttons I'm trying to add at run time get added to the "_pageNAV" canvas... <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/...
- 26 Aug 2014, 03:33
- Forum: General Discussion
- Replies: 26
- Views: 15535
Re: Creating a button dynamically (C++)
Attempting the line above causes an "Expression must have class type" error. I did however try to apply this to each button after they were added but that did not help the situation. That said, there currently are only two canvases right now, the main canvas and this one "SOMEcanvas&q...
- 25 Aug 2014, 21:59
- Forum: General Discussion
- Replies: 26
- Views: 15535
Re: Creating a button dynamically (C++)
I think I found the problem: Remember in my XAML I have the main canvas, and a sub-canvas. <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="1000" Height="800" HorizontalAlig...
- 25 Aug 2014, 15:30
- Forum: General Discussion
- Replies: 26
- Views: 15535
Re: Creating a button dynamically (C++)
I'm already doing that. There are buttons created in the same XAML directly (mainly the MFD mode buttons) and these work fine. It's definitely the buttons created at run-time that have the issue. I've also tried creating the dynamic buttons WITHOUT the image content just to make sure that wasn't an ...
- 25 Aug 2014, 14:33
- Forum: General Discussion
- Replies: 26
- Views: 15535
Re: Creating a button dynamically (C++)
1. If the button is created in XAML then yes, it works properly. I suppose if I had to I could pre-build, say, 20 placeholders and hide them until needed, but creating exactly what is needed at run-time seems more elegant, obviously :) 2. Yes, this is a render to texture (part of an MFD display) 3. ...
- 25 Aug 2014, 00:43
- Forum: General Discussion
- Replies: 26
- Views: 15535
Re: Creating a button dynamically (C++)
Yes, still happens regardless if I transform the button or not--I get no reaction from it when I hover or click.
That was my assumption with the click-able image--just wanted to verify. Thanks...
That was my assumption with the click-able image--just wanted to verify. Thanks...
- 24 Aug 2014, 04:18
- Forum: General Discussion
- Replies: 26
- Views: 15535
Creating a button dynamically (C++)
Hi. Sorry if this is a noob question: I'm trying to create a button dynamically and add it to a loaded XAML via this code: .h void someCLICKevent(Noesis::Core::BaseComponent* obj, const Noesis::Gui::RoutedEventArgs& args); Noesis::Ptr<Noesis::Gui::Button> someBTN; .cpp void someCLICKevent(Noesis...
- 20 Aug 2014, 18:04
- Forum: General Discussion
- Replies: 4
- Views: 2490
Re: Change fill color of a rectangle at runtime (c++)
Cheers. Thanks again for the help...
- 20 Aug 2014, 17:55
- Forum: General Discussion
- Replies: 4
- Views: 2490
Re: Change fill color of a rectangle at runtime (c++)
Based on your example, I used this so I could precisely set the color: Noesis::Ptr<Noesis::Gui::Brush> Fill = *new Noesis::Gui::SolidColorBrush(Noesis::Drawing::Color(0, 255, 0)); rectangle->SetFill(Fill .GetPtr()); But yes, works great. Your Noesis::Ptr handles the cleanup, yes? I don't have to del...
- 19 Aug 2014, 23:56
- Forum: General Discussion
- Replies: 4
- Views: 2490
Change fill color of a rectangle at runtime (c++)
Hi all
Subject says it all--I'm simply trying to change the fill color of a rectangle at run time via c++. Seems like a simple thing but I'm having no luck. Obviously I'm overlooking the obvious
Thanks for any help...
Subject says it all--I'm simply trying to change the fill color of a rectangle at run time via c++. Seems like a simple thing but I'm having no luck. Obviously I'm overlooking the obvious
Thanks for any help...