Home » Community » Newbie corner » edit field in sub menu
edit field in sub menu [message #37493] |
Thu, 11 October 2012 02:26 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
Can an edit field be added to a sub menu and if so how.
void SettingsMenu(Bar& bar) {
bar.Add("m meters", THISBACK(Setm)).Check(mX);
bar.Add("km kilometers", THISBACK(Setkm)).Check(kmX);
bar.Add("ft feet", THISBACK(Setft)).Check(ftX);
There are about a dozen more.
I would a user to be able to set a time zone relative to UTC.
I have it hard coded -7 for the Pacific TZ.
Rather than have a box pop up where a user types in his TZ relative to UTC just have an edit field it can be typed in.
If not then maybe just a scroll box where -11 to +11 can be picked.
[Updated on: Thu, 11 October 2012 02:27] Report message to a moderator
|
|
|
|
|
Re: edit field in sub menu [message #37501 is a reply to message #37500] |
Thu, 11 October 2012 20:00 |
|
nlneilson wrote on Thu, 11 October 2012 18:24 | Widget placement, size, etc. yes.
|
Something like this should work:
EditString edit;
void Menu(Bar& bar) {
bar.Add(edit.SizePos(),50);
bar.Add("Exit", THISBACK(Exit));
}
Best regards,
Honza
EDIT: Added full source in attachment.
-
Attachment: main.cpp
(Size: 0.52KB, Downloaded 181 times)
[Updated on: Thu, 11 October 2012 20:02] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Thu Apr 18 17:40:06 CEST 2024
Total time taken to generate the page: 0.01309 seconds
|