Monday, December 11th 2017, 2:23pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

ToneL

Beginner

Date of registration: Nov 1st 2011

Posts: 12

1

Monday, August 13th 2012, 11:27pm

EDIT Widget properties - how to copy

I have eight EDIT widgets on the screen at the same time and I want to enter values with numeric buttons on screen. Since I have small LCD some of EDIT's are not visible when I show numpad in new modal framewin.
I want to copy all EDIT Widget properties form primary EDIT_widget to secondary EDIT_widget.
I know that all properties are in EDIT_Obj structure, but I don't know how to access them.
I need this for setting EDIT widget value. When I will press on EDIT widget, then I want to show new modal framewin with numeric buttons and new EDIT widget at the top of framewin.
This EDIT widget in framewin at the top of numeric buttons should have all parameters same as EDIT that was clicked.
I want to copy all properties for example: Value , Mode (Float,Dec,Bin,Hex,Text), Min value , Max value , num digits , Text ...
After finished editing I need to copy changed value or text back to primary EDIT widget.
Can you please suggest how to do this.

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

2

Tuesday, August 14th 2012, 9:51am

Hello ToneL,

Please note that the EDIT_Obj structure is internal and intended to be accessed via EDIT widget API functions only. For detailed information about the function set provided with the EDIT widget, please refer to the chapter 16 "Widgets" in the emWin user manual. You should be able to find all functions necessary for the task you would like to implement.

Best regards,
Adrian

ToneL

Beginner

Date of registration: Nov 1st 2011

Posts: 12

3

Tuesday, August 14th 2012, 3:38pm

Thanks for your answer !

In manuals I can't find for example how to read EDIT Widget mode (Bin,Hex,Dec,etc) from existing EDIT Widget.
Do I need to use EDIT_CreateUser with extra bytes for saving properties ?

Best regards !

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

4

Wednesday, August 15th 2012, 9:26am

Hello ToneL,

Yes, using extra bytes should be the best attempt to do this. The editing mode is not a simple property which could be read, so there is no function for that.

Best regards,
Adrian