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 » Hello, need a helping hand
Re: Hello, need a helping hand [message #26831 is a reply to message #26830] Tue, 01 June 2010 15:55 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3361
Registered: August 2008
Senior Veteran
jerson wrote on Tue, 01 June 2010 15:11

Hi folks

I'm an absolute newbie to C++ coding and UPP. I code in C and VB6. I stumbled upon UPP a few days back and find it really interesting; however, my lack of knowledge about C++ and UPP is only making it difficult to cross the initial barriers.

I have worked with the examples and am able to run almost all of them. There are some that I cannot understand that report errors(in the uppsrc directory). I work on a WinXP machine.

Right now, I am able to create the example code called shopping list I found on the www. This was a very nice example to learn UPP. However, the next step has frustrated me and I will like a helping hand if anyone can.

On the layout, I wish to place a slider control visually (if that is possible) and link it to a text label that will show the value of the slider. I am able to place the static text label & name it. But, how do I place the slider? I suspect it has to be done in code. Being a total newbie in UPP and a total zero in C++ means a double whammy and I'm stuck. I want to migrate away from VB6 and come to UPP.

I intend to add new controls and eventually graduate to creating a simple RS232 terminal for my own use while 'learning the ropes'

Can anyone guide me gently please ?

I will appreciate links too if this is something I missed here.

Thanks


Hello Jerson

Yes, you can enter the SliderCtrl in the Layout designer.

If you right click the mouse in the Layout designer and choose Progress/SliderCtrl you will get it.

To do it in a very simple way you can get the package Reference/Layout, and modify it adding an SliderCtrl.

For example, in Layout example after adding:

- a SliderCtrl named slider

- a Label named text;

, change the code with this:

void Slider() {
    text = AsString(~slider);
}

GUI_APP_MAIN
{
    WithDialogLayout<TopWindow> dlg;
    CtrlLayoutOKCancel(dlg, "Enter a number");
    dlg.number <<= 10;
    dlg.slider <<= THISBACK(SliderFunc);
    for(;;)
        switch(dlg.Execute()) {
        case IDOK:
            PromptOK(AsString(~dlg.number));
            break;
        case IDCANCEL:
            return;
        }
}


I advise you to follow this:

1. Check the samples:
After that you like U++.

2. Read the documentation:
After that you understand

3. Check the samples you prefer again and read the code
After that you really understand Smile


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: is U++ the right tool for this?
Next Topic: EditField ctrl and StaticText ctrl in a StatusBar crtl
Goto Forum:
  


Current Time: Fri May 10 18:29:08 CEST 2024

Total time taken to generate the page: 0.02491 seconds