Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Set tex from variable
No permission to create posts
January 17, 2016
12:04 am
Avatar
marga
Member
Members
Forum Posts: 7
Member Since:
January 16, 2016
sp_UserOfflineSmall Offline

Hello everyone, this is the first time I write in this forum. I just started to use rackafx and I already have a problem: I have a variable that represents the total frequency of an oscillator and it is updated each time the user moves one of the 4 knobs. Now I would like to see the value of this variable to a label or in a text (the user does not change the value directly from the text / label) but I can not find anything about it. I hope not to have wrong category and have been clear. Thank you in advance. luca

January 17, 2016
3:03 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

You need to use the GUI Designer and create a text label to represent your output text.

The label will need to be a Custom Control (using the Advanced GUI API) that you create. Then, as the user moves the controls, you can trap the events in userInterfaceChange( ) and alter the text label with your new values.

The Advanced GUI API Tutorials are here:

http://www.willpirkle.com/supp.....tutorials/

See Module 4 which shows you how to alter a text label on the GUI from within your RAFX plugin's userInterfaceChange( ) method.

- Will

January 17, 2016
6:47 pm
Avatar
marga
Member
Members
Forum Posts: 7
Member Since:
January 16, 2016
sp_UserOfflineSmall Offline

many thanks man I did not imagine that something as basic as a text label I had to look in the gui advanced . goodbye see you soon
Cool

February 5, 2016
4:07 pm
Avatar
marga
Member
Members
Forum Posts: 7
Member Since:
January 16, 2016
sp_UserOfflineSmall Offline

hi,Regarding use of the label text, I have successfully executed the pointer management, making "print" on the desired text.
Now, I tried to set a value (float, double, ..) instead of text, editing -> setText ("...") in setValue (x), but nothing happens; only appears "ready" (thanks to function GUI_HAS ...).
there is' something else to change to make operational the text with numerical values?
thank you

February 5, 2016
9:53 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

Convert the numerical values to character strings, then use setText( ) as setValue( ) is for value-based controls like knobs or sliders.

Look in pluginconstants.h

There are several helper functions for that

floatToString( )
doubleToString( )
intToString( )
uintToString( )

and

addStrings( ) for concatenating strings e.g. "20.0 dB"

You must delete the resulting character pointer after you are done with it.

FYI: I have added TextLabel control linking in the current beta/working version of RAFX - however, it will not be released for quite some time as I am overhauling the main GUI and adding more goodies, so for the next several months, the way to go is with the custom view approach.

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: W Pirkle
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 477

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 483

Posts: 1877

Newest Members:

Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143