|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Alexander Zubkov
|
May 15, 2010 - 10:41 AM
|
I apologize for molestation. Unable to cope with the component "navigationBar". I put on the form component "navigationBar", added a few "toggleButton". Keep abreast of the switch with: System:: Void navigationBar1_PressedToggleButtonChanged (System:: Object ˆ sender, Elegant:: Ui:: NavigationBarPressedToggleButtonChangedEventArgs ˆ e) How do I find the text of the selected "toggleButton"? Sorry for my bad English.
|
|
Alexander Zubkov
|
May 26, 2010 - 8:51 AM
|
Hello! Faced with a problems. I need software to swap "toggleButton". I tried this: navigationBar1-> PressedToggleButton-> Location = System:: Drawing:: Point (2, 150) I can not. How to be in this situation?
|
|
Technical Support
|
May 27, 2010 - 10:07 AM
|
You can move a ToggleButton to another position in a NavigationBar using the following code: // the new preferrable position
int newChildPosition = 1;
// button you want to move within the navigation bar’s child collection
Elegant::Ui::ToggleButton tb = navigationBar1->Controls[0];
navigationBar1->Controls->SetChildIndex(tb, newChildPosition);
|
|
Technical Support
|
May 18, 2010 - 11:51 AM
|
You can use the following code: ToggleButton tg = new ToggleButton();
tg.Text = "My Text";
navBar.Controls.Add(tg);
|
|
Alexander Zubkov
|
May 20, 2010 - 7:05 AM
|
Write happened. But it is now "toggleButton" remove from navigationBar? =) If you do so: DestroyWindow ((HWND) navigationBar1-> PressedToggleButton-> Handle.ToPointer ()); What: navigationBar1-> Controls-> Count does not change, but "toggleButton" removed.
|
|
Technical Support
|
May 21, 2010 - 7:13 AM
|
You should use the following code instead: if (navigationBar1.PressedToggleButton != null)
navigationBar1.Controls.Remove(navigationBar1.PressedToggleButton)
|
|
Technical Support
|
May 17, 2010 - 6:31 AM
|
We have a bug in NavigationBar v3.6 regarding PressedToggleButtonChanged event which is to be fixed in v3.7. Meanwhile you can use the following workaround:
System::Void navigationBar1_PressedToggleButtonChanged(System::Objectˆ sender, Elegant::Ui::NavigationBarPressedToggleButtonChangedEventArgsˆ e) { System::Stringˆ selectedToggleButtonText = navigationBar1->PressedToggleButton->Text; if(e->OldPressedToggleButton != nullptr && e->OldPressedToggleButton == navigationBar1->PressedToggleButton) return;
label1->Text = selectedToggleButtonText; }
|
|
Alexander Zubkov
|
May 18, 2010 - 11:26 AM
|
|
|
Alexander Zubkov
|
May 18, 2010 - 3:02 AM
|
Thank you. And the last question: Is it possible at runtime to create a "toggleButton" by the user? And how?
|
|
Alexander Zubkov
|
May 18, 2010 - 3:02 AM
|
спасибо. И последний вопрос: возможно ли в процессе выполнения программы создать "toggleButton" по желанию пользователя? И как?
|
|