GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem in changing size of window

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
harinath88
GTK+ Geek


Joined: 30 Jul 2009
Posts: 88

PostPosted: Fri Mar 19, 2010 3:31 pm    Post subject: problem in changing size of window Reply with quote

hi everybody,

My problem is i am setting width and hight to 50,50 as bellow and aswell as from glade tool.

But it is not happennig it.

could any one help me out where i am going wrong.

Code: (C)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
short int Decorations(void)
{
    GtkWidget *win;
   
   
    static int count= 0;

    win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_modal ((GtkWindow *)win,TRUE);
   
                                                     

    gtk_widget_set_size_request(Param_widgets.progress_window,50,50);                                         
    gtk_window_set_decorated((GtkWindow *)Param_widgets.progress_window,FALSE);
    gtk_container_add (GTK_CONTAINER (win),Param_widgets.progrss_image);

    gtk_widget_show(Param_widgets.progress_window);
    while(1)
    {
       switch(count)
       {
            case 0:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P1.png");break;
            case 1:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P2.png");break;
            case 2:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P3.png");break;
            case 3:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P4.png");break;
            case 4:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P5.png");break;
            case 5:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P6.png");break;
            case 6:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P7.png");break;
            case 7:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P8.png");break;
            default:break;
       }

       if(7 == count++)
           count= 0;
   
   
   
   
         
     

        //g_static_mutex_lock(&my_mutex);

       
if(NO == cntl_response || cntl_response>0)
        {

           
           
            gtk_widget_destroy(win);
            g_thread_exit( thread3);
           
        }

        //g_static_mutex_unlock(&my_mutex);
   
}

       
       
}
Added CodeBB -dreblen

thanks and regards,
harinath.
Back to top
Joel
GTK+ Guru


Joined: 06 Apr 2008
Posts: 225
Location: Fortress of solitude

PostPosted: Fri Mar 19, 2010 6:32 pm    Post subject: Reply with quote

It's confuse:
Code: (C)
1
2
3
4
5

win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_modal ((GtkWindow *)win,TRUE);
gtk_widget_set_size_request(Param_widgets.progress_window,50,50);                               gtk_window_set_decorated((GtkWindow *)Param_widgets.progress_window,FALSE);

win is the toplevel window and Param_widgets.progress_window is a dialog or banner?
how are you creating Param_widgets.progress_window?
Back to top
harinath88
GTK+ Geek


Joined: 30 Jul 2009
Posts: 88

PostPosted: Sun Mar 21, 2010 5:12 am    Post subject: Reply with quote

hi Joel,

Sorry for inconvenience and Thanks for ur kind reply. Bellow one is the actual code .

I am un able to decorate it(the border is not disappeared).

Code: (C)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
GtkWidget *win;
    GtkWidget *image;
   
    static int count= 0;

    win = gtk_window_new (GTK_WINDOW_TOPLEVEL);   
    gtk_window_set_modal ((GtkWindow *)win,TRUE);
    image = gtk_image_new();
   
                                                     

    gtk_widget_set_size_request(win,50,50);                                         
    gtk_window_set_decorated((GtkWindow *)win,FALSE);
    gtk_container_add (GTK_CONTAINER (win),image);

    gtk_widget_show(win);
    while(1)
    {
       switch(count)
       {
            case 0:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P1.png");break;
            case 1:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P2.png");break;
            case 2:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P3.png");break;
            case 3:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P4.png");break;
            case 4:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P5.png");break;
            case 5:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P6.png");break;
            case 6:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P7.png");break;
            case 7:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P8.png");break;
            default:break;
       }

       if(7 == count++)
           count= 0;
   
   
   
   
         
     

        //g_static_mutex_lock(&my_mutex);

       
if(NO == cntl_response || cntl_response>0)
        {

           
            gtk_widget_destroy(image);
            gtk_widget_destroy(win);
            g_thread_exit( thread3);
           
        }

        //g_static_mutex_unlock(&my_mutex);
   
}

       
       
}
Added CodeBB -dreblen


Thanks & Regards ,
Harianth.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP