LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-12-2020, 08:25 AM   #1
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Rep: Reputation: Disabled
MonoDevolop question


Hi,
I started using Monodevelop in Linux Mint, to write up a gui in c#, but I'm finding using gtk to make a gui isn't
as easy as it is in Visual Studio (in Windows). One problem I've run into is when I add a "text view" widget
it's only showing 1 line for text, and it isn't wrapping text, I'm not sure why.
There's no toggle for the widget setting for text wrapping either.
Anyone know how to get it so a text window in Monodevelop is capable of multiple lines ?

Last edited by program1; 04-12-2020 at 09:03 AM.
 
Old 04-12-2020, 03:01 PM   #2
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Sorry, I think I found the problem, I added an Entry instead of a TextBox,
now I have multiple lines including a workable scrollbar.

Although, on the MonoDevelop website they have an example of using TextBox : https://www.monodevelop.com/document...-gui-designer/
which uses a buffer for (delayed) sending text to the textbox.
Anyone know why ? and if there's a more immediate way to append/add text to the textbox ?
 
Old 04-12-2020, 04:00 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
If so, then glad you got it solved.

Please use the Thread Tools menu and mark the thread as solved so that it may possibly help someone with a similar problem in the future.
 
Old 04-12-2020, 05:35 PM   #4
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Ok, thanks, I had a follow-up question, but I'll mark it as solved.
 
Old 04-12-2020, 05:50 PM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Absolutely ask your follow up question. This is your thread.
 
Old 04-12-2020, 06:21 PM   #6
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Ok, thanks.
Hopefully last question regarding this textbox in MonoDevelop.
When I write a simple loop to generate some text, it doesn't show the
text, nor update the progressbar, until after the loop is actually over, code here :

protected void Button_click(object sender, EventArgs e)
{
for (loop=1; loop<=3000; loop++)
{
array1[loop] = loop;
textview1.Buffer.Text += loop.ToString() + "\n";

progressbar1.Fraction = (loop / 3000);
progressbar1.Text = ((loop / 3000)*100).ToString();
}
}


How can I get the text and progressbar to update during each iteration of the for-loop
progresses ?
 
Old 04-13-2020, 07:22 AM   #7
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
You probably want to read this: https://www.mono-project.com/docs/gu...-applications/
 
Old 04-18-2020, 12:12 PM   #8
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SoftSprocket View Post
Yea, I think that describes the problem going on
This makes making GUIs with MonoDevelop & GTK a lot more complex than I prefer,
especially after using the much simpler Visual Studio on Windows.

Does anyone know a alternative to MonoDevelop that makes it simple for creating GUIs to
work with C#, C, or C++ on Linux Mint ?
Sorry if I sound lazy, I just don't like spending extensive amount of time dinking around
with having to code and/or design GUIs and getting them to work
 
Old 04-19-2020, 11:51 AM   #9
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
I'm not sure if there is another C# IDE but of course there are many C and C++ alternatives. Are they simpler? I guess that's a judgement call.

I use C# and VS extensively, on Windows, in my professional life and it can get pretty complex depending of course on the complexity of the project and the gui library.

All the gui libraries I've used have some form of loop in which events are handled. Updates outside of the thread where the loop runs usually require some tap dancing to manage data integrity; in the main event thread, timing issues often require management.

I recently took a new look at some of the libraries around for C and C++ gui development. I personally wound up continuing with QT though I'm opting to learn to use it without relying on the macros that often seem to muddy things (for me). Ultimate++ is an IDE for cross-platform C++ development with a strong business leaning (i.e. its libraries are oriented towards business applications) that impressed me but since my personal interests don't run to doing business applications the QT libraries were of greater interest to me.

GTK has been ported to many languages and so there might be an advantage to learning it, I suppose depending on your own approach to programming.
 
Old 04-19-2020, 12:22 PM   #10
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo, Egypt
Distribution: MX Linux, Ubuntu 18.04
Posts: 336

Rep: Reputation: 42
For C++ on Linux Mint, you can use Qt Creator. It has a GUI designer and works on Linux, Windows and Mac.
 
Old 04-19-2020, 01:37 PM   #11
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kareempharmacist View Post
For C++ on Linux Mint, you can use Qt Creator. It has a GUI designer and works on Linux, Windows and Mac.

Yea, I saw QT, but it's like $5000/year license, ouch . I'll have to pass on that.

I did discover some threading work-arounds that seem to work in MonoDevelop,
it's just going to be a learning process with the new environment

Thanks for the suggestion and help

Last edited by program1; 04-19-2020 at 01:38 PM.
 
Old 04-19-2020, 02:32 PM   #12
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
QT is free for open source: https://doc.qt.io/qt-5/opensourcelicense.html
 
1 members found this post helpful.
Old 04-19-2020, 02:42 PM   #13
program1
LQ Newbie
 
Registered: Apr 2020
Posts: 14

Original Poster
Rep: Reputation: Disabled
Oh, I didn't catch that, thanks !
 
Old 04-19-2020, 02:50 PM   #14
EdGr
Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 999

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Quote:
Originally Posted by program1 View Post
Does anyone know a alternative to MonoDevelop that makes it simple for creating GUIs to work with C#, C, or C++ on Linux Mint ?
Sorry if I sound lazy, I just don't like spending extensive amount of time dinking around
with having to code and/or design GUIs and getting them to work
Glade is the GUI builder for GTK. For a complex GUI, using Glade is much easier than writing C code.

That being said, GTK is not particularly good at minimizing the number of lines of code. A simple GUI starts at around 500 lines. Once written, that can be used as a template for additional GUIs.
Ed
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache newbie question.. (very newbie question) tarballed Linux - Newbie 1 02-07-2003 08:41 PM
RE: Suse 8.0 hardware question {newbie question, pls help} Radiouk Linux - Distributions 2 06-04-2002 12:53 PM
RE: Samba question pls help {Newbie question} Radiouk Linux - Networking 4 06-03-2002 06:40 PM
Security question {newbie question} Radio Linux - Security 3 05-17-2002 06:32 PM
Lilo/kernel question & font question phek Linux - General 9 09-18-2001 12:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration