Author |
Topic: Calculated output to combobox (Read 831 times) |
|
ady
Junior Member
member is offline


Posts: 55
|
 |
Re: Calculated output to combobox
« Reply #5 on: Nov 30th, 2013, 5:18pm » |
|
I'll use anything.... if it works I'm just trying to build a simple windows widget which will accept dynamic outputs
PROC_editbox(Dlg%, "Text box",165, 10, 190, 200, 65, &1)
A$="ggggggggg"
SYS "SetDlgItemText",!dlg%,165,A$
Doesn't work either
The DLG example gives outputs only, is there an example with inputs, which dynamically change and then it displays the new outputs
The edit box changes on the final output to the screen but it would be more useful if there was a routine which copied the users input to an output somewhere else on the dialogue box
|
| « Last Edit: Nov 30th, 2013, 5:47pm by ady » |
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Calculated output to combobox
« Reply #6 on: Nov 30th, 2013, 6:03pm » |
|
on Nov 30th, 2013, 5:18pm, ady wrote:| The DLG example gives outputs only |
|
That's incorrect, it shows both inputs and outputs! It has this code to enter data into the combobox:
Code: SYS "SendDlgItemMessage", !dlg%, 103, CB_ADDSTRING, 0, "Combobox 1"
SYS "SendDlgItemMessage", !dlg%, 103, CB_ADDSTRING, 0, "Combobox 2"
SYS "SendDlgItemMessage", !dlg%, 103, CB_ADDSTRING, 0, "Combobox 3"
SYS "SendDlgItemMessage", !dlg%, 103, CB_ADDSTRING, 0, "Combobox 4"
SYS "SendDlgItemMessage", !dlg%, 103, CB_SETCURSEL, 0, 0 And it has this code to extract data from the combobox:
Code: DIM text% 255
SYS "GetDlgItemText", !dlg%, 103, text%, 255
PRINT "Combobox selection was """$$text%"""" Can't you adapt this code to your requirements?
Richard.
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Calculated output to combobox
« Reply #7 on: Nov 30th, 2013, 8:10pm » |
|
on Nov 30th, 2013, 5:18pm, ady wrote: PROC_editbox(Dlg%, "Text box",165, 10, 190, 200, 65, &1)
A$="ggggggggg"
SYS "SetDlgItemText",!dlg%,165,A$
Doesn't work either |
|
The main reason for this seems to be that you're not using the same variable: you create the dlg box with Dlg% and try to change it with dlg%. These are not the same. They need to be both dlg% or both Dlg%.
Matt
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Calculated output to combobox
« Reply #8 on: Nov 30th, 2013, 8:37pm » |
|
on Nov 30th, 2013, 8:10pm, Matt wrote:| The main reason for this seems to be that you're not using the same variable: you create the dlg box with Dlg% and try to change it with dlg%. |
|
I noticed that, but the fact remains that you can't write to a combobox that way, so even if the variables had been the same his original code wouldn't have worked (although the textbox version would).
We badly need that GUILIB library!
Richard.
|
| « Last Edit: Nov 30th, 2013, 11:34pm by admin » |
Logged
|
|
|
|
ady
Junior Member
member is offline


Posts: 55
|
 |
Re: Calculated output to combobox
« Reply #9 on: Dec 1st, 2013, 3:49pm » |
|
Got it sorted using the combobox system, thanks chaps
We badly need that GUILIB library!
Took me 2 days to do a 5 minute job there, definitely agree
|
|
Logged
|
|
|
|
|