Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » how alter name of EditField ?
how alter name of EditField ? [message #58127] Tue, 22 February 2022 01:46 Go to next message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi,
Instead of creating the editfield in the editor, if I wanted to do this at runtime (or dynamically), I would set
EditField myfield
So my question is: for umnome to receive the name identifier "code" what property/method do I have to call?
analogous to a myfield.SetName ="code" or myfield.SetId="code"

How do I name my myfield field?


my goal is that this field created at runtime, along with the fields I create in the layout editor, it can be identified in the routine below:

	for(Ctrl *q = x; q; q = q->GetNext()){
           if(dynamic_cast<EditField *>(q)) {
              String id = q->GetLayoutId();
              String sv = q->GetData().ToString();
    ----->   if( id.IsEqual("myfieldcreateddinamically")  )
                   doSomething();
           } 
         }


Thanks!

Re: how alter name of EditField ? [message #58128 is a reply to message #58127] Tue, 22 February 2022 01:53 Go to previous message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member

I found:

EditField myfield; (dynamically)

---> myfield.LayoutId("codigo");

(sorry/ Thanks!)
Previous Topic: reference solved:
Next Topic: Why this simple app won't compile?
Goto Forum:
  


Current Time: Sun Jun 23 10:13:05 CEST 2024

Total time taken to generate the page: 0.02085 seconds