Click here to Skip to main content
15,907,396 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Do you embed classes within classes? Pin
BernardIE531730-Apr-24 0:28
BernardIE531730-Apr-24 0:28 
GeneralRe: Do you embed classes within classes? Pin
Gary Wheeler30-Apr-24 1:13
Gary Wheeler30-Apr-24 1:13 
GeneralRe: Do you embed classes within classes? Pin
charlieg30-Apr-24 16:45
charlieg30-Apr-24 16:45 
GeneralRe: Do you embed classes within classes? Pin
steve.tabler30-Apr-24 3:20
steve.tabler30-Apr-24 3:20 
GeneralRe: Do you embed classes within classes? Pin
charlieg30-Apr-24 16:49
charlieg30-Apr-24 16:49 
GeneralRe: Do you embed classes within classes? Pin
steve.tabler30-Apr-24 18:35
steve.tabler30-Apr-24 18:35 
GeneralRe: Do you embed classes within classes? Pin
charlieg2-May-24 11:05
charlieg2-May-24 11:05 
GeneralRe: Do you embed classes within classes? Pin
steve.tabler5-May-24 16:13
steve.tabler5-May-24 16:13 
Perhaps a dialog's returning a custom data class wasn't the best argument. I think I have a better argument for an embedded class, anyway. I'm working on a class that programmatically displays rectangles of specific color samples, and the user is expected to click on the particular rectangle to select a color. OK, nothing special about that. I am displaying the colors in a matrix of rectangles that are programmatically generated panels, given a generic List of colors that I want to present. After I got deep into the coding, I decided I wanted to have a border around every rectangle, where the color of the border signified which palette the color was in. Not that there are expected to be a lot of palettes, maybe 1, 2 or 3. But I ran into a problem: the panel control doesn't have a means to define the color of it's border. I posed that problem to ChatGPT, and it suggested I write a custom Panel class that extends the standard panel class and showed me how I could override paint to put a border of any specified color around the Panels I am creating. I don't plan to use this custom panel class anywhere else, it is short and to the point, and there seems no reason yet for having it in a stand-alone file.

Steve
GeneralRe: Do you embed classes within classes? Pin
charlieg6-May-24 2:35
charlieg6-May-24 2:35 
GeneralRe: Do you embed classes within classes? Pin
PIEBALDconsult30-Apr-24 3:55
mvePIEBALDconsult30-Apr-24 3:55 
GeneralRe: Do you embed classes within classes? Pin
charlieg30-Apr-24 16:46
charlieg30-Apr-24 16:46 
GeneralRe: Do you embed classes within classes? Pin
hpcoder222-May-24 20:19
hpcoder222-May-24 20:19 
GeneralRule and Exception Pin
Amarnath S29-Apr-24 0:53
professionalAmarnath S29-Apr-24 0:53 
GeneralRe: Rule and Exception Pin
Mike Hankey29-Apr-24 1:12
mveMike Hankey29-Apr-24 1:12 
GeneralRe: Rule and Exception Pin
obermd29-Apr-24 3:26
obermd29-Apr-24 3:26 
GeneralRe: Rule and Exception Pin
englebart4-May-24 16:41
professionalenglebart4-May-24 16:41 
GeneralRe: Rule and Exception Pin
PIEBALDconsult29-Apr-24 3:30
mvePIEBALDconsult29-Apr-24 3:30 
GeneralRe: Rule and Exception Pin
k505429-Apr-24 4:21
mvek505429-Apr-24 4:21 
GeneralRe: Rule and Exception Pin
Amarnath S29-Apr-24 17:47
professionalAmarnath S29-Apr-24 17:47 
GeneralRe: Rule and Exception Pin
trønderen29-Apr-24 5:28
trønderen29-Apr-24 5:28 
GeneralRe: Rule and Exception Pin
Richard Andrew x6429-Apr-24 8:32
professionalRichard Andrew x6429-Apr-24 8:32 
GeneralRe: Rule and Exception Pin
trønderen29-Apr-24 10:59
trønderen29-Apr-24 10:59 
GeneralRe: Rule and Exception Pin
jschell29-Apr-24 15:03
jschell29-Apr-24 15:03 
GeneralRe: Rule and Exception Pin
Amarnath S29-Apr-24 17:45
professionalAmarnath S29-Apr-24 17:45 
GeneralRe: Rule and Exception Pin
jschell30-Apr-24 12:02
jschell30-Apr-24 12:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.